Skip to content

Commit

Permalink
Merge pull request #14 from ezfe/improv-module-loading
Browse files Browse the repository at this point in the history
Improved module loading errors
  • Loading branch information
naor2013 committed Oct 1, 2018
2 parents 7048cca + 578aebb commit f21b4fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/command_line/command_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def _load_commands(self, reload=False):
self._modules.append(module)
except ImportError:
self._retry_modules.append(os.path.basename(cmd)[:-3])
except NotImplementedError:
_io.print(
f"Couldn't import {os.path.basename(cmd)[:-3]} since it's unimplemented",
color="red",
)
except Exception as e:
_io.print(
f"Couldn't import {os.path.basename(cmd)[:-3]} due to error: {e}",
Expand Down

0 comments on commit f21b4fc

Please sign in to comment.