Skip to content

Commit

Permalink
getattr doesn't support default
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Feb 13, 2015
1 parent ff24d08 commit 65033de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tradeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, properties=None, **kwargs):
self.__dict__.update(kwargs)


def __getattr__(self, key, default=None):
def __getattr__(self, key):
""" Return the default for attributes we don't have """
if key.startswith("DEBUG"):
# Self-assembling DEBUGN functions
Expand Down Expand Up @@ -71,6 +71,5 @@ def __NOTE_DISABLED(*args, **kwargs):
setattr(self, key, noteFn)
return noteFn

return default

return None

0 comments on commit 65033de

Please sign in to comment.