cc-4105: hasattr in conditional statement instead of getattr
This commit is contained in:
parent
8340079b95
commit
499a0a5850
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue