diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-03-09 19:27:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-03-09 19:27:45 +0000 |
commit | 714d5f823322b86d11a38b648b801dc0feecab75 (patch) | |
tree | cee15dc4843dbe87e351aaafc8a31186b5699d53 | |
parent | ba9d63676152041abeb973b6f5b81e7501b2e40b (diff) | |
download | portage-714d5f823322b86d11a38b648b801dc0feecab75.tar.gz portage-714d5f823322b86d11a38b648b801dc0feecab75.tar.bz2 portage-714d5f823322b86d11a38b648b801dc0feecab75.zip |
Use ewarn output style to add some color.
svn path=/main/trunk/; revision=15802
-rw-r--r-- | pym/_emerge/sync/old_tree_timestamp.py | 14 |
1 files 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 |