From 499a0a58509db925771eb9a148342e5d47a59c25 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 13 Jul 2012 18:04:20 -0400 Subject: [PATCH] cc-4105: hasattr in conditional statement instead of getattr --- python_apps/media-monitor2/media/monitor/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/events.py b/python_apps/media-monitor2/media/monitor/events.py index 4538db3ea..434a4fdc2 100644 --- a/python_apps/media-monitor2/media/monitor/events.py +++ b/python_apps/media-monitor2/media/monitor/events.py @@ -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