diff options
Diffstat (limited to 'src/lib/Bcfg2Py3k.py')
-rw-r--r-- | src/lib/Bcfg2Py3k.py | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/lib/Bcfg2Py3k.py b/src/lib/Bcfg2Py3k.py index b334c4466..0f5321a41 100644 --- a/src/lib/Bcfg2Py3k.py +++ b/src/lib/Bcfg2Py3k.py @@ -5,13 +5,21 @@ except ImportError: # urllib imports try: - from urllib import urlopen -except ImportError: - from urllib.request import urlopen -try: from urlparse import urljoin + from urllib2 import HTTPBasicAuthHandler + from urllib2 import HTTPPasswordMgrWithDefaultRealm + from urllib2 import build_opener + from urllib2 import install_opener + from urllib import urlopen + from urllib2 import HTTPError except ImportError: from urllib.parse import urljoin + from urllib.request import HTTPBasicAuthHandler + from urllib.request import HTTPPasswordMgrWithDefaultRealm + from urllib.request import build_opener + from urllib.request import install_opener + from urllib.request import urlopen + from urllib.error import HTTPError try: from cStringIO import StringIO @@ -22,3 +30,17 @@ try: import ConfigParser except ImportError: import configparser as ConfigParser + +try: + import cPickle +except ImportError: + import pickle as cPickle + +try: + from Queue import Queue + from Queue import Empty + from Queue import Full +except ImportError: + from queue import Queue + from queue import Empty + from queue import Full |