summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Lupo <cosimo.lupo@daltonmaag.com>2016-12-25 16:40:49 +0000
committerCosimo Lupo <cosimo.lupo@daltonmaag.com>2016-12-25 16:40:49 +0000
commitc64f7b8622c936859a9e006b6f4a2f5e2c33ee1b (patch)
treee12c81c58bdc9ea54bea0932878c2f7b588c3203
parente9d029b78194764caee109c434d887ab36413000 (diff)
downloadpython-coveragepy-check-source-isdir.tar.gz
control.Coverage._init: check "source" is a directory, not just it exists; there could be a file with that namecheck-source-isdir
-rw-r--r--coverage/control.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 1b7edc4..992ca58 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -219,7 +219,7 @@ class Coverage(object):
self.source = []
self.source_pkgs = []
for src in self.config.source or []:
- if os.path.exists(src):
+ if os.path.isdir(src):
self.source.append(files.canonical_filename(src))
else:
self.source_pkgs.append(src)