From dd2f667542ba9ebe34f304f328e7d4fd621ce57a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 21 Dec 2018 15:18:52 +0100 Subject: 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. --- crocoite/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- cgit v1.2.3