summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-08-11 08:13:38 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-08-11 08:59:25 -0700
commit000580dda57439ab0bb1dab42b91edac835a6e96 (patch)
tree6de215ff22d4306e4eb7f8d1d95b6d39a2509dea /pym
parent2e5a3b4c423eaefbbc8d1ad2fff55168c22cb48d (diff)
downloadgentoolkit-000580dda57439ab0bb1dab42b91edac835a6e96.tar.gz
prevent a possible unknown object "cleaner"
Diffstat (limited to 'pym')
-rw-r--r--pym/gentoolkit/eclean/cli.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py
index e6c75d0..16f4adc 100644
--- a/pym/gentoolkit/eclean/cli.py
+++ b/pym/gentoolkit/eclean/cli.py
@@ -394,6 +394,10 @@ def doAction(action,options,exclude={}, output=None):
size_limit=options['size-limit'],
deprecate = options['deprecated']
)
+
+ # initialize our cleaner
+ cleaner = CleanUp( output.progress_controller)
+
# actually clean files if something was found
if clean_me:
# verbose pretend message
@@ -403,7 +407,6 @@ def doAction(action,options,exclude={}, output=None):
elif not options['quiet']:
output.einfo("Cleaning " + files_type +"...")
# do the cleanup, and get size of deleted files
- cleaner = CleanUp( output.progress_controller)
if options['pretend']:
clean_size = cleaner.pretend_clean(clean_me)
elif action in ['distfiles']:
@@ -419,7 +422,7 @@ def doAction(action,options,exclude={}, output=None):
# display freed space
if not options['quiet']:
output.total('normal', clean_size, len(clean_me), verb, action)
- # nothing was found, return
+ # nothing was found
elif not options['quiet']:
output.einfo("Your "+action+" directory was already clean.")
if saved and not options['quiet']: