public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r15806 - main/branches/2.1.7/pym/_emerge/sync
@ 2010-03-09 20:20 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-03-09 20:20 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2010-03-09 20:20:51 +0000 (Tue, 09 Mar 2010)
New Revision: 15806

Modified:
   main/branches/2.1.7/pym/_emerge/sync/old_tree_timestamp.py
Log:
Use ewarn output style to add some color. (trunk r15802)

Modified: main/branches/2.1.7/pym/_emerge/sync/old_tree_timestamp.py
===================================================================
--- main/branches/2.1.7/pym/_emerge/sync/old_tree_timestamp.py	2010-03-09 20:20:41 UTC (rev 15805)
+++ main/branches/2.1.7/pym/_emerge/sync/old_tree_timestamp.py	2010-03-09 20:20:51 UTC (rev 15806)
@@ -9,7 +9,8 @@
 from portage import os
 from portage.exception import PortageException
 from portage.localization import _
-from portage.util import grabfile, writemsg_level, writemsg_stdout
+from portage.output import EOutput
+from portage.util import grabfile, writemsg_level
 
 def have_english_locale():
 	lang, enc = locale.getdefaultlocale()
@@ -87,13 +88,12 @@
 		return False
 
 	if (unixtime - 86400 * warnsync) > lastsync:
+		out = EOutput()
 		if have_english_locale():
-			writemsg_stdout(">>> Last emerge --sync was %s ago\n" % \
-				whenago(unixtime - lastsync), noiselevel=-1)
+			out.ewarn("Last emerge --sync was %s ago" % \
+				whenago(unixtime - lastsync))
 		else:
-			writemsg_stdout(">>> %s\n" % \
-				_("Last emerge --sync was %s") % \
-				time.strftime('%c', time.localtime(lastsync)),
-				noiselevel=-1)
+			out.ewarn(_("Last emerge --sync was %s") % \
+				time.strftime('%c', time.localtime(lastsync)))
 		return True
 	return False




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-09 20:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 20:20 [gentoo-commits] portage r15806 - main/branches/2.1.7/pym/_emerge/sync Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox