Skip to content

Commit

Permalink
Singleton now catches TypeError when handling updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dangle committed Jan 7, 2018
1 parent a47a420 commit 6fc4f3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typet/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __call__(cls, *args, **kwargs):
else:
try:
cls.__instance__.__singleton__(*args, **kwargs) # type: ignore
except AttributeError:
except (AttributeError, TypeError):
pass
return cls.__instance__

Expand All @@ -99,7 +99,7 @@ def __call__(cls, *args, **kwargs):
else:
try:
cls.__instance__.__init__(*args, **kwargs) # type: ignore
except AttributeError:
except (AttributeError, TypeError):
pass
return cls.__instance__

Expand Down

0 comments on commit 6fc4f3e

Please sign in to comment.