# Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
# Distributed under the GPL v2
+ 11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+ modules/catalyst/support.py, modules/catalyst/target/generic_stage.py,
+ modules/catalyst/util.py:
+ Move countdown() from catalyst.support to catalyst.util
+
11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
modules/catalyst/support.py, modules/catalyst/target/generic_stage.py,
modules/catalyst/util.py:
if not x in myspec:
raise CatalystError, "Required argument \""+x+"\" not specified."
-def countdown(secs=5, doing="Starting"):
- if secs:
- print ">>> Waiting",secs,"seconds before starting..."
- print ">>> (Control-C to abort)...\n"+doing+" in: ",
- ticks=range(secs)
- ticks.reverse()
- for sec in ticks:
- sys.stdout.write(str(sec+1)+" ")
- sys.stdout.flush()
- time.sleep(1)
- print
-
myf.close()
def purge(self):
- countdown(10,"Purging Caches ...")
+ catalyst.util.countdown(10, "Purging Caches ...")
if "PURGE" in self.settings or "PURGEONLY" in self.settings:
print "clearing autoresume ..."
self.clear_autoresume()
"Error generating contents, is appropriate utility (%s) installed on your system?" \
% (contents_function, )
+def countdown(secs=5, doing="Starting"):
+ if secs:
+ print ">>> Waiting " + secs + " seconds before starting..."
+ print ">>> (Control-C to abort)..."
+ print doing + " in: ",
+ ticks = range(secs)
+ ticks.reverse()
+ for sec in ticks:
+ sys.stdout.write(str(sec+1) + " ")
+ sys.stdout.flush()
+ time.sleep(1)
+ print
+