From acc999454466b34104002b0d7c4e60d61cdfc605 Mon Sep 17 00:00:00 2001 From: nanotube Date: Fri, 16 Sep 2005 05:43:44 +0000 Subject: [PATCH] fixed bug in parsing the nolog option, which caused the whole program to not log anything. --- logwriter.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/logwriter.py b/logwriter.py index 9fafa81..d022f34 100644 --- a/logwriter.py +++ b/logwriter.py @@ -69,11 +69,12 @@ class LogWriter: subDirName = self.GetProcessNameFromHwnd(event.Window) #our subdirname is the full path of the process owning the hwnd. - for path in noLog: #check our options to make sure that we dont log specified apps. - if os.stat(path) == os.stat(subDirName): #we use os.stat instead of comparing strings due to multiple possible representations of a path - if self.debug: - print "we dont log this" - return False + if noLog != None: + for path in noLog: #check our options to make sure that we dont log specified apps. + if os.stat(path) == os.stat(subDirName): #we use os.stat instead of comparing strings due to multiple possible representations of a path + if self.debug: + print "we dont log this" + return False if self.debug: print "we log this" -- 2.45.1