From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4A2E213888F for ; Sun, 11 Oct 2015 06:29:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B72721C001; Sun, 11 Oct 2015 06:29:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 540C1E07D6 for ; Sun, 11 Oct 2015 06:29:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 56EC7340676 for ; Sun, 11 Oct 2015 06:29:17 +0000 (UTC) From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH 05/10] clearbase: convert to log module Date: Sun, 11 Oct 2015 02:29:07 -0400 Message-Id: <1444544952-32408-5-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1444544952-32408-1-git-send-email-vapier@gentoo.org> References: <1444544952-32408-1-git-send-email-vapier@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: 15f4504e-6599-49a6-80c2-2f2e433e5a43 X-Archives-Hash: 6c39df4ab9608dee929ef74ed02e1b81 --- 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) -- 2.5.2