Commit graph

42 commits

Author SHA1 Message Date
Noam Meltzer
3076dfc086 use urllib3 instead of urllib(2) 2016-05-30 01:05:19 +03:00
Leandro Toledo
1e398821a0 Introducing telegram.error.BadRequest and testLeaveChat testcase #302 2016-05-25 21:15:17 -03:00
Leandro Toledo
d445d35ceb Running yapf for codebase #259 2016-05-14 22:46:40 -03:00
Noam Meltzer
0c74b3cfb9 bot.py + request.py: network_delay is unique for getUpdates 2016-04-28 01:41:32 +03:00
Noam Meltzer
0ca3ef7a38 utils.request: clean imports using feature.moves 2016-04-28 01:41:32 +03:00
Jannes Höke
48eb623f15 Merge branch 'bot-api-2.0' into dispatcher-rework 2016-04-19 01:24:02 +02:00
Leandro Toledo
9a340d2ea9 Endorsing if empty or 0 or empty string and minor typo fix #232 2016-04-18 20:18:32 -03:00
Noam Meltzer
ecc86d4bcd request: catch socket.error
socket.error is another exception which is thrown by the underlying
infrastacture and not handled by the urllib2 or httplib layers

fixes #236
2016-04-16 19:09:45 +03:00
Rahiel Kasim
01b90e7ede small improvements 2016-04-02 23:13:49 +02:00
Leandro Toledo
1e4ae6546f Changing INFO logs to DEBUG and minor fixes 2016-03-14 22:56:20 -03:00
Jannes Höke
cd42524fd4 Merge pull request #174 from python-telegram-bot/inlinebots
Implement Inlinebots
2016-02-28 02:10:21 +01:00
Noam Meltzer
ccb24d1288 request.py: fix for python2.7 2016-02-27 23:13:29 +02:00
Noam Meltzer
fc618274ae bot.py: allow specifying timeout for sendVideo operations 2016-02-27 23:00:33 +02:00
Noam Meltzer
2338377eda request: better parsing of URLError exception 2016-02-20 15:20:00 +02:00
Rahiel Kasim
d02e656700 raise NetworkError for HTTP 502 (Bad Gateway) 2016-02-09 15:26:59 +01:00
Noam Meltzer
7ebbc60694 Unauthorized is HTTP code 401
I am not certain where the older 403 came from, but for now going to
leave it as is
2016-02-07 00:56:30 +02:00
Noam Meltzer
d4beb94059 Add specific exceptions types for important errors
maintain backward compatibility with the 'old' exception by inherting
from TelegramError and using the same message
2016-02-06 18:48:55 +02:00
Noam Meltzer
2859a8873f utils.request: catch URLError in _try_except_req decorator 2016-02-06 18:48:55 +02:00
Noam Meltzer
dc032b349c _try_except_req(): catch httplib.HTTPException
fixes #153
2016-01-19 22:02:34 +02:00
Jannes Höke
aa8966832b release 3.2 and update copyright notice to 2015-2016 2016-01-05 14:12:03 +01:00
Noam Meltzer
bc2679f2ae utils.request: provide HTTP error code with unknown errors 2016-01-04 00:32:17 +02:00
Noam Meltzer
21fdaa4ff7 utils.request: decorate functions with general try... except...
refs #134
2016-01-04 00:31:40 +02:00
Noam Meltzer
79f29c4b9e properly handle utf-8 server response & identify json parsing errors
refs #134
2016-01-04 00:31:40 +02:00
Jannes Höke
ea7c54ba07 Release v3.1.1, change author email everywhere 2015-12-21 21:18:53 +01:00
Jannes Höke
10451509f1 fix for issue #79 2015-11-12 19:15:39 +01:00
Jannes Höke
0b4c23f50e improve error handling on timeouts 2015-11-11 14:06:10 +01:00
Jannes Höke
93afd3eabe remove check for network_delay 2015-11-10 23:12:20 +01:00
Jannes Höke
61dac76bee don't send network_delay to telegram servers 2015-11-10 22:40:19 +01:00
Jannes Höke
4bc03ed56a Add parameter network_delay for slow connections and increase default to 2 seconds 2015-11-10 19:47:21 +01:00
Leandro Toledo
6c13762c93 Fixes PEP8 and Lint minor issues 2015-11-10 12:10:50 -02:00
Jannes Höke
cd5e805692 added documentation 2015-11-10 05:16:16 +01:00
Rahiel Kasim
dcb9129809 raise exception if telegram times out on long-polling 2015-11-02 20:30:37 +01:00
Leandro Toledo
6c9490f2c6 Handles HTTP Bad Gateway error (503) on request module #63 2015-09-24 09:17:50 -03:00
Leandro Toledo
b79530b10c Adding File and its tests 2015-09-20 12:28:10 -03:00
Leandro Toledo
f623db06ea Revert "Feature/requests" 2015-09-16 00:21:45 -03:00
pecheny
d5a9c185f0 use requests instead of urllib if possible; add timeout and decorator to get and post 2015-09-14 19:13:22 +03:00
Leandro Toledo
eb557e0eba Keeping features under development off this release 2015-09-10 20:37:25 -03:00
Leandro Toledo
a7ac4193fe PEP8, lint and TelegramError class refactor 2015-09-10 20:08:24 -03:00
leandrotoledo
009862593b Fix Py3 2015-09-09 09:34:45 -03:00
leandrotoledo
e2fa052f54 Send JSON requests over urlencoded post data 2015-09-09 09:29:23 -03:00
leandrotoledo
e1edeb7bec Improve design of this class 2015-09-07 15:54:12 -03:00
leandrotoledo
c590d9c2fd Moving _requestURL method to utils package 2015-09-05 11:56:06 -03:00