Commit f3524221 authored by ilv's avatar ilv
Browse files

Changes made a while ago in getulum (production code)

parent 7b052eba
...@@ -212,33 +212,31 @@ class TwitterBot(object): ...@@ -212,33 +212,31 @@ class TwitterBot(object):
sender_id = dm['sender']['id_str'] sender_id = dm['sender']['id_str']
msg = dm['text'].strip().lower() msg = dm['text'].strip().lower()
bogus_request = False bogus_req = False
request = None req = None
status = '' status = ''
try: try:
if self._is_blacklisted(str(sender_id)): if self._is_blacklisted(str(sender_id)):
self.log.info('blacklist; none; none') 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") self.log.debug("Request seems legit, let's parse it")
# let's try to guess what the user is asking # 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 # possible options: links, mirrors, help
if request['type'] == 'links': if req['type'] == 'links':
self.log.info('links; %s; %s' % (req['os'], req['lc'])) self.log.info('links; %s; %s' % (req['os'], req['lc']))
links = self.core.get_links( links = self.core.get_links(
'Twitter', 'twitter', req['os'], req['lc']
request['os'],
request['lc']
) )
reply = self._get_msg('links', 'en') 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']) self.log.info('mirrors; none; %s' % req['lc'])
reply = self._get_msg('mirrors', 'en') reply = self._get_msg('mirrors', 'en')
try: try:
......
...@@ -140,11 +140,7 @@ if __name__ == '__main__': ...@@ -140,11 +140,7 @@ if __name__ == '__main__':
elif p3.match(file): elif p3.match(file):
osys, arch, lc = get_bundle_info(file, 'osx') osys, arch, lc = get_bundle_info(file, 'osx')
link = "Tor Browser %s-bit:\n%s$Tor Browser's signature %s-bit:"\ link = "%s$%s$%s$" % (link_file[u'url'], link_asc[u'url'], sha_file)
"\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)
# note that you should only upload bundles for supported locales # note that you should only upload bundles for supported locales
core.add_link('Dropbox', osys, lc, link) core.add_link('Dropbox', osys, lc, link)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment