diff --git a/src/blueberrypy/shell.py b/src/blueberrypy/shell.py index a6841ab..f4ec01c 100644 --- a/src/blueberrypy/shell.py +++ b/src/blueberrypy/shell.py @@ -5,7 +5,15 @@ def get_user_namespace(config, include_pkg=False): - assert isinstance(config, BlueberryPyConfiguration), type(config) + if not isinstance(config, BlueberryPyConfiguration): + raise TypeError( + 'Expected config to be {expected_type}, ' + 'but got {actual_type}' + .format( + expected_type=BlueberryPyConfiguration, + actual_type=type(config), + ) + ) ns = {'__name__': 'blueberrypy-shell'}