summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-03-13 20:12:05 -0500
committerNed Batchelder <ned@nedbatchelder.com>2010-03-13 20:12:05 -0500
commit78e2e6eb38d229cfcd4d0202f27761cd5bab2495 (patch)
tree93866af62ea60710682aaa5a6e709b55cd29b69b /coverage/files.py
parent543ff12a09952b132abd9aa863d4170c4e2523f4 (diff)
parenta5e4aa218a749f9ea73bccea4cac92bd35387451 (diff)
downloadpython-coveragepy-78e2e6eb38d229cfcd4d0202f27761cd5bab2495.tar.gz
Merged Ben Finney's use-os-path-module fixes (again?)
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/files.py b/coverage/files.py
index fb59732..ace47c1 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -40,6 +40,8 @@ class FileLocator(object):
f = os.path.basename(f)
if not os.path.isabs(f):
for path in [os.curdir] + sys.path:
+ if path is None:
+ continue
g = os.path.join(path, f)
if os.path.exists(g):
f = g
@@ -69,7 +71,7 @@ class FileLocator(object):
data = zi.get_data(parts[1])
except IOError:
continue
- if sys.hexversion > 0x03000000:
+ if sys.version_info >= (3, 0):
data = data.decode('utf8') # TODO: How to do this properly?
return data
return None