From 714d5f823322b86d11a38b648b801dc0feecab75 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 9 Mar 2010 19:27:45 +0000 Subject: [PATCH] Use ewarn output style to add some color. svn path=/main/trunk/; revision=15802 --- pym/_emerge/sync/old_tree_timestamp.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/sync/old_tree_timestamp.py b/pym/_emerge/sync/old_tree_timestamp.py index 9bd070c13..d24116f15 100644 --- a/pym/_emerge/sync/old_tree_timestamp.py +++ b/pym/_emerge/sync/old_tree_timestamp.py @@ -9,7 +9,8 @@ import time 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 @@ def old_tree_timestamp_warn(portdir, settings): 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 -- 2.26.2