Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
damnever committed Nov 7, 2017
1 parent 79bab04 commit 65fccdb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pigar/reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,11 @@ def is_stdlib(name):
# Testcase: ResourceWarning
if isinstance(module_info[0], FileType):
module_info[0].close()
if exist and (module_info[1] is not None and
('site-packages' in module_info[1] or
'dist-packages' in module_info[1])):
mpath = module_info[1]
if exist and (mpath is not None and
('site-packages' in mpath or
'dist-packages' in mpath or
('bin/' in mpath and mpath.endswith('.py')))):
exist = False
return exist

Expand Down

0 comments on commit 65fccdb

Please sign in to comment.