aboutsummaryrefslogtreecommitdiffstats
path: root/src/msec/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/msec/tools.py')
-rwxr-xr-xsrc/msec/tools.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/msec/tools.py b/src/msec/tools.py
index 3a079cd..cb9d1bf 100755
--- a/src/msec/tools.py
+++ b/src/msec/tools.py
@@ -9,6 +9,8 @@ import sys
import time
import locale
+from config import Narg, SYS_ENC
+
# localization
import gettext
try:
@@ -30,7 +32,7 @@ def find_firewall_info(log):
if l[:3] == "-A ":
firewall_entries.append(l.strip())
except:
- log.error(_("Unable to parse firewall configuration: %s") % sys.exc_value)
+ log.error(_("Unable to parse firewall configuration: %s") % Narg(sys.exc_value))
# not find out if the firewall is enabled
if len(firewall_entries) == 0:
firewall_status = _("Disabled")
@@ -44,10 +46,9 @@ def get_updates_status(log, updatedir="/var/lib/urpmi"):
try:
ret = os.stat(updatedir)
updated = time.localtime(ret[stat.ST_MTIME])
- updated_s = time.strftime(locale.nl_langinfo(locale.D_T_FMT), updated)
- status = _("Last updated: %s") % updated_s
+ status = _("Last updated: %s") % Narg(updated_s)
except:
- log.error(_("Unable to access %s: %s") % (updatedir, sys.exc_value))
+ log.error(_("Unable to access %s: %s") % (updatedir, Narg(sys.exc_value)))
status = _("Unable to determine update status")
return status