Skip to content

Commit

Permalink
raise attribute error if config is accessed when not configured
Browse files Browse the repository at this point in the history
this allows cases where hasattr is called on config
  • Loading branch information
ipelupessy committed Oct 29, 2019
1 parent 81e489e commit d9fb4fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amuse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class NoConfig(object):
def __init__(self, message):
self._message=message
def __getattr__(self, attr):
raise Exception(self._message)
raise AttributeError(self._message)

try:
from . import config
Expand Down

0 comments on commit d9fb4fb

Please sign in to comment.