aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-10-17 19:09:49 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-10-17 19:09:49 -0700
commitf727908fd506c0602be6bc8b51d844b978469555 (patch)
tree9a9f4d34c1c4efc32a8f2dca10eadfed92377a69 /mirrorselect/selectors.py
parentget_filesystem_mirrors() cleanup & fixes (diff)
downloadmirrorselect-f727908fd506c0602be6bc8b51d844b978469555.tar.gz
mirrorselect-f727908fd506c0602be6bc8b51d844b978469555.tar.bz2
mirrorselect-f727908fd506c0602be6bc8b51d844b978469555.zip
Improve python version testing for imports.
Use Arfrever's suggested code.
Diffstat (limited to 'mirrorselect/selectors.py')
-rw-r--r--mirrorselect/selectors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py
index 230ca15..d72fd23 100644
--- a/mirrorselect/selectors.py
+++ b/mirrorselect/selectors.py
@@ -36,7 +36,7 @@ import sys
import time
import hashlib
-if int(sys.version[0]) == 3:
+if sys.version_info[0] >= 3:
import urllib.request, urllib.parse, urllib.error
url_parse = urllib.parse.urlparse
url_open = urllib.request.urlopen