File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
- .PHONY : clean pep8 lint test
1
+ .PHONY : clean pep8 lint test install
2
2
3
3
clean :
4
4
rm -fr build
16
16
test :
17
17
nosetests
18
18
19
+ install :
20
+ pip install -r requirements.txt
21
+
19
22
help :
20
23
@echo " Available targets:"
21
24
@echo " - clean Clean up the source directory"
Original file line number Diff line number Diff line change 17
17
# You should have received a copy of the GNU Lesser Public License
18
18
# along with this program. If not, see [http://www.gnu.org/licenses/].
19
19
20
- """This module contains a object that represents a Telegram Message Parse Modes"""
20
+ """This module contains a object that represents a Telegram
21
+ Message Parse Modes"""
21
22
22
23
23
24
class ParseMode (object ):
Original file line number Diff line number Diff line change 23
23
from ssl import SSLError
24
24
25
25
try :
26
- from urllib .parse import urlencode
27
26
from urllib .request import urlopen , urlretrieve , Request
28
- from urllib .error import HTTPError , URLError
27
+ from urllib .error import HTTPError
29
28
except ImportError :
30
- from urllib import urlencode , urlretrieve
29
+ from urllib import urlretrieve
31
30
from urllib2 import urlopen , Request
32
- from urllib2 import HTTPError , URLError
31
+ from urllib2 import HTTPError
33
32
34
33
from telegram import (InputFile , TelegramError )
35
34
@@ -82,8 +81,8 @@ def post(url,
82
81
83
82
# Add one second to the timeout of urlopen to allow data to be transferred
84
83
# over the network.
85
- if " timeout" in data :
86
- timeout = data [" timeout" ] + 1.
84
+ if ' timeout' in data :
85
+ timeout = data [' timeout' ] + 1.
87
86
else :
88
87
timeout = None
89
88
You can’t perform that action at this time.
0 commit comments