cc-4105: hasattr in conditional statement instead of getattr

This commit is contained in:
Rudi Grinberg 2012-07-13 18:04:20 -04:00 committed by Martin Konecny
parent 71dc7d99b4
commit 0e98bc75c8
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class BaseEvent(object):
# TODO : clean up this idiotic hack
# we should use keyword constructors instead of this behaviour checking
# bs to initialize BaseEvent
if getattr(raw_event,"pathname"):
if hasattr(raw_event,"pathname"):
self.__raw_event = raw_event
self.path = os.path.normpath(raw_event.pathname)
else: self.path = raw_event