File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2- # pylint: disable=no-name-in-module,unused-import
32#
43# A library that provides a Python interface to the Telegram Bot API
54# Copyright (C) 2015-2016
2524import socket
2625from ssl import SSLError
2726
28- try :
29- # python2
30- from httplib import HTTPException
31- except ImportError :
32- # python3
33- from http .client import HTTPException
34-
35- try :
36- # python3
37- from urllib .request import urlopen , urlretrieve , Request
38- from urllib .error import HTTPError , URLError
39- except ImportError :
40- # python2
41- from urllib import urlretrieve
42- from urllib2 import urlopen , Request , URLError
43- from urllib2 import HTTPError
27+ from future .moves .http .client import HTTPException
28+ from future .moves .urllib .error import HTTPError , URLError
29+ from future .moves .urllib .request import urlopen , urlretrieve , Request
4430
4531from telegram import (InputFile , TelegramError )
4632from telegram .error import Unauthorized , NetworkError , TimedOut
You can’t perform that action at this time.
0 commit comments