summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-12-21 15:18:52 +0100
committerLars-Dominik Braun <lars@6xq.net>2018-12-21 20:29:25 +0100
commitdd2f667542ba9ebe34f304f328e7d4fd621ce57a (patch)
treede3618515b94af22f298975410abae17ca749c80
parent5e444dd6511d97308a84ae9c86ebf14547d01f01 (diff)
downloadcrocoite-dd2f667542ba9ebe34f304f328e7d4fd621ce57a.tar.gz
crocoite-dd2f667542ba9ebe34f304f328e7d4fd621ce57a.tar.bz2
crocoite-dd2f667542ba9ebe34f304f328e7d4fd621ce57a.zip
util: Skip missing source files
Requirement extraction fails if the package is an .egg file (i.e. not extracted). Do not try to compute checksum/file length for them.
-rw-r--r--crocoite/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/crocoite/util.py b/crocoite/util.py
index 73a1d65..eebe909 100644
--- a/crocoite/util.py
+++ b/crocoite/util.py
@@ -87,7 +87,7 @@ def getRequirements (dist):
pkg = getattr (m, '__package__', None)
# is loaded?
if pkg in modules:
- if f:
+ if f and os.path.isfile (f):
with open (f, 'rb') as fd:
contents = fd.read ()
h = hashlib.new ('sha512')