Skip to content

Commit

Permalink
Fixed threadlocal error in python2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
anandology committed Jul 4, 2011
1 parent a42ca49 commit 5c49b13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/python23.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class threadlocal(object):
def __getattribute__(self, name):
if name == "__dict__":
return threadlocal._getd(self)
elif name.startswith("__"):
# for handling special atrributes like __class__ etc.
return object.__getattribute__(self, name)
else:
try:
return self.__dict__[name]
except KeyError:
raise AttributeError, name
return object.__getattribute__(self, name)
except AttributeError:
try:
return self.__dict__[name]
except KeyError:
raise AttributeError, name

def __setattr__(self, name, value):
self.__dict__[name] = value
Expand Down

0 comments on commit 5c49b13

Please sign in to comment.