cc-4105: hasattr in conditional statement instead of getattr

This commit is contained in:
Rudi Grinberg 2012-07-13 18:04:20 -04:00
parent 8340079b95
commit 499a0a5850

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