Commit e45a517d authored by ilv's avatar ilv
Browse files

Better name for OS (twitter/xmpp)

parent 6f7b7b33
......@@ -24,6 +24,12 @@ import blacklist
"""Twitter channel for distributing links to download Tor Browser."""
OS = {
'osx': 'Mac OS X',
'linux': 'Linux',
'windows': 'Windows'
}
class ConfigError(Exception):
pass
......@@ -234,7 +240,7 @@ class TwitterBot(object):
)
reply = self._get_msg('links', 'en')
reply = reply % (req['os'], req['lc'], links)
reply = reply % (OS[req['os']], links)
elif req['type'] == 'mirrors':
self.log.info('mirrors; none; %s' % req['lc'])
......
......@@ -30,6 +30,12 @@ import blacklist
"""XMPP module for processing requests."""
OS = {
'osx': 'Mac OS X',
'linux': 'Linux',
'windows': 'Windows'
}
class ConfigError(Exception):
pass
......@@ -316,7 +322,7 @@ class XMPP(object):
req['lc']
)
reply = self._get_msg('links', 'en')
reply = reply % (req['os'], req['lc'], links)
reply = reply % (OS[req['os']], links)
except (core.ConfigError, core.InternalError) as e:
# if core failes, send the user an error message, but keep going
......
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