Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
e45a517d
Commit
e45a517d
authored
Feb 16, 2016
by
ilv
Browse files
Better name for OS (twitter/xmpp)
parent
6f7b7b33
Changes
2
Hide whitespace changes
Inline
Side-by-side
gettor/twitter.py
View file @
e45a517d
...
...
@@ -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'
])
...
...
gettor/xmpp.py
View file @
e45a517d
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment