[tor-commits] [gettor/master] Changes made a while ago in getulum (production code)

ilv at torproject.org ilv at torproject.org
Mon Feb 15 20:35:27 UTC 2016


commit f3524221026b960fc103761f907da6b3e2c4344a
Author: ilv <ilv at users.noreply.github.com>
Date:   Mon Feb 15 17:38:20 2016 -0300

    Changes made a while ago in getulum (production code)
---
 gettor/twitter.py         | 20 +++++++++-----------
 upload/bundles2dropbox.py |  6 +-----
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/gettor/twitter.py b/gettor/twitter.py
index f4b934f..7fedffe 100644
--- a/gettor/twitter.py
+++ b/gettor/twitter.py
@@ -212,33 +212,31 @@ class TwitterBot(object):
 
         sender_id = dm['sender']['id_str']
         msg = dm['text'].strip().lower()
-        bogus_request = False
-        request = None
+        bogus_req = False
+        req = None
         status = ''
 
         try:
             if self._is_blacklisted(str(sender_id)):
                 self.log.info('blacklist; none; none')
-                bogus_request = True
+                bogus_req = True
 
-            if not bogus_request:
+            if not bogus_req:
                 self.log.debug("Request seems legit, let's parse it")
                 # let's try to guess what the user is asking
-                request = self.parse_text(str(msg))
+                req = self.parse_text(str(msg))
 
                 # possible options: links, mirrors, help
-                if request['type'] == 'links':
+                if req['type'] == 'links':
                     self.log.info('links; %s; %s' % (req['os'], req['lc']))
                     links = self.core.get_links(
-                        'Twitter',
-                        request['os'],
-                        request['lc']
+                        'twitter', req['os'], req['lc']
                     )
 
                     reply = self._get_msg('links', 'en')
-                    reply = reply % (request['os'], request['lc'], links)
+                    reply = reply % (req['os'], req['lc'], links)
 
-                elif request['type'] == 'mirrors':
+                elif req['type'] == 'mirrors':
                     self.log.info('mirrors; none; %s' % req['lc'])
                     reply = self._get_msg('mirrors', 'en')
                     try:
diff --git a/upload/bundles2dropbox.py b/upload/bundles2dropbox.py
index 40157bc..04e86af 100644
--- a/upload/bundles2dropbox.py
+++ b/upload/bundles2dropbox.py
@@ -140,11 +140,7 @@ if __name__ == '__main__':
             elif p3.match(file):
                 osys, arch, lc = get_bundle_info(file, 'osx')
 
-            link = "Tor Browser %s-bit:\n%s$Tor Browser's signature %s-bit:"\
-                    "\n%s$SHA256 checksum of Tor Browser %s-bit (advanced):"\
-                    "\n%s$" %\
-                   (arch, link_file[u'url'], arch, link_asc[u'url'],
-                    arch, sha_file)
+            link = "%s$%s$%s$" % (link_file[u'url'], link_asc[u'url'], sha_file)
 
             # note that you should only upload bundles for supported locales
             core.add_link('Dropbox', osys, lc, link)



More information about the tor-commits mailing list