[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Fix typo in db query
commit 74fbbc771c72dc5b3df38f04973b4b61f9d8c437
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Tue Oct 15 21:17:33 2019 +0200
Fix typo in db query
---
gettor/services/twitter/twitterdm.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gettor/services/twitter/twitterdm.py b/gettor/services/twitter/twitterdm.py
index 18af727..11659f9 100644
--- a/gettor/services/twitter/twitterdm.py
+++ b/gettor/services/twitter/twitterdm.py
@@ -79,7 +79,10 @@ class Twitterdm(object):
:return: deferred whose callback/errback will handle the API execution
details.
"""
+ return send_tweet()
+
+ def send_tweet(self):
post_data = self.twitter.post_message(
twitter_id, message
)
@@ -88,6 +91,8 @@ class Twitterdm(object):
else:
self.twitter_errback
+ return post_data
+
@defer.inlineCallbacks
def get_new(self):
"""
@@ -114,7 +119,7 @@ class Twitterdm(object):
)
link_requests = yield self.conn.get_requests(
- status="ONHOLD", command="links", service="twtter"
+ status="ONHOLD", command="links", service="twitter"
)
if help_requests:
@@ -123,7 +128,7 @@ class Twitterdm(object):
log.info("Got new help request.")
for request in help_requests:
- ids = json.loads("{}".format(request[0].replace("'", '"')))
+ ids = json.loads("{}".format(request[0]))
message_id = ids['id']
twitter_id = ids['twitter_handle']
date = request[5]
@@ -158,7 +163,7 @@ class Twitterdm(object):
log.info("Got new links request.")
for request in link_requests:
- ids = json.loads("{}".format(request[0].replace("'", '"')))
+ ids = json.loads("{}".format(request[0]))
message_id = ids['id']
twitter_id = ids['twitter_handle']
date = request[5]
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits