Skip to content

Commit

Permalink
fixed issue when location in PATH does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 31, 2017
1 parent ba88995 commit 4078647
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aw_qt/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ def _discover_modules_system() -> List[str]:
search_paths = os.environ["PATH"].split(":")
modules = []
for path in search_paths:
files = os.listdir(path)
for filename in files:
if "aw-" in filename:
modules.append(filename)
if os.path.isdir(path):
files = os.listdir(path)
for filename in files:
if "aw-" in filename:
modules.append(filename)

logger.info("Found system modules: {}".format(set(modules)))
return modules
Expand Down

0 comments on commit 4078647

Please sign in to comment.