]> code.delx.au - bg-scripts/commitdiff
Cleaned up the logging code (again)
authorGreg Darke <greg@tsukasa.net.au>
Wed, 16 Jul 2008 07:04:08 +0000 (17:04 +1000)
committerGreg Darke <greg@tsukasa.net.au>
Wed, 16 Jul 2008 07:04:08 +0000 (17:04 +1000)
randombg.py

index d069b4983c990b358e1639af2de4d01d7fe33d6f..3deac9cdec948147cc46670d0ca55f0ba3b19da0 100755 (executable)
@@ -41,16 +41,16 @@ class BaseFileList(object):
 
        def store_cache(self, filename):
                try:
-                       debug("Attempting to store cache")
+                       logging.debug("Attempting to store cache")
                        fd = open(filename, 'wb')
                        pickle.dump(obj = self, file = fd, protocol = 2)
-                       debug("Cache successfully stored")
+                       logging.debug("Cache successfully stored")
                except Exception, e:
                        warning("Storing cache: %s" % e)
 
        def load_cache(self, filename):
                try:
-                       debug("Attempting to load cache from: %s" % filename)
+                       logging.debug("Attempting to load cache from: %s" % filename)
                        self.paths.sort()
 
                        fd = open(filename, 'rb')
@@ -69,7 +69,7 @@ class BaseFileList(object):
                        return True
 
                except Exception, e:
-                       warning("Loading cache: %s" % e)
+                       logging.warning("Loading cache: %s" % e)
                        return False
 
        def scan_paths(self):