Skip to content

Commit

Permalink
catch the attribute error and return None
Browse files Browse the repository at this point in the history
  • Loading branch information
nanorepublica committed Apr 13, 2017
1 parent 2e9a442 commit 7a1a865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion duedil/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def __getattr__(self, name):
if name in self.attribute_names:
if not self.loaded:
self.load()
return super(Resource, self).__getattribute__(name)
try:
return super(Resource, self).__getattribute__(name)
except AttributeError:
return None
else:
raise

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run_tests(self):
sys.exit(errno)


version = '1.0.5'
version = '1.0.6'

setup(name='duedil',
version=version,
Expand Down

0 comments on commit 7a1a865

Please sign in to comment.