commit:     4f358eec1331b8facdbdc7eb36bfd702fd31ad29
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:15:43 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 23:54:37 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4f358eec

clearbase: convert to log module

 catalyst/base/clearbase.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index b2c1a11..3817196 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -1,5 +1,6 @@
 
 
+from catalyst import log
 from catalyst.support import countdown
 from catalyst.fileops import clear_dir
 
@@ -15,38 +16,38 @@ class ClearBase(object):
        def clear_autoresume(self):
                """ Clean resume points since they are no longer needed """
                if "autoresume" in self.settings["options"]:
-                       print "Removing AutoResume Points: ..."
+                       log.notice('Removing AutoResume Points ...')
                        self.resume.clear_all()
 
 
        def remove_autoresume(self):
                """ Rmove all resume points since they are no longer needed """
                if "autoresume" in self.settings["options"]:
-                       print "Removing AutoResume: ..."
+                       log.notice('Removing AutoResume ...')
                        self.resume.clear_all(remove=True)
 
 
        def clear_chroot(self):
                self.chroot_lock.unlock()
-               print 'Clearing the chroot path ...'
+               log.notice('Clearing the chroot path ...')
                clear_dir(self.settings["chroot_path"], 0755, True)
 
 
        def remove_chroot(self):
                self.chroot_lock.unlock()
-               print 'Removing the chroot path ...'
+               log.notice('Removing the chroot path ...')
                clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
 
 
        def clear_packages(self, remove=False):
                if "pkgcache" in self.settings["options"]:
-                       print "purging the pkgcache ..."
+                       log.notice('purging the pkgcache ...')
                        clear_dir(self.settings["pkgcache_path"], remove=remove)
 
 
        def clear_kerncache(self, remove=False):
                if "kerncache" in self.settings["options"]:
-                       print "purging the kerncache ..."
+                       log.notice('purging the kerncache ...')
                        clear_dir(self.settings["kerncache_path"], 
remove=remove)
 
 
@@ -54,15 +55,15 @@ class ClearBase(object):
                countdown(10,"Purging Caches ...")
                if any(k in self.settings["options"] for k in ("purge",
                                "purgeonly", "purgetmponly")):
-                       print "purge(); clearing autoresume ..."
+                       log.notice('purge(); clearing autoresume ...')
                        self.clear_autoresume()
 
-                       print "purge(); clearing chroot ..."
+                       log.notice('purge(); clearing chroot ...')
                        self.clear_chroot()
 
                        if "purgetmponly" not in self.settings["options"]:
-                               print "purge(); clearing package cache ..."
+                               log.notice('purge(); clearing package cache 
...')
                                self.clear_packages(remove)
 
-                       print "purge(); clearing kerncache ..."
+                       log.notice('purge(); clearing kerncache ...')
                        self.clear_kerncache(remove)

Reply via email to