[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Moving message about unrecognized terms into config
commit b466e4cd2e1eb2d64b9c04a90e031be22ef35a97
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Oct 18 11:23:03 2013 -0700
Moving message about unrecognized terms into config
Moving hardcoded message to 'msg.unknown_term'.
---
arm/settings.cfg | 5 +++++
arm/starter.py | 7 +++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arm/settings.cfg b/arm/settings.cfg
index a42a081..ebbe273 100644
--- a/arm/settings.cfg
+++ b/arm/settings.cfg
@@ -65,6 +65,11 @@ msg.unable_to_determine_pid Unable to determine Tor's pid. Some information, lik
msg.unable_to_use_resolver Unable to query connections with {old_resolver}, trying {new_resolver}
msg.unable_to_use_all_resolvers We were unable to use any of your system's resolvers to get tor's connections. This is fine, but means that the connections page will be empty. This is usually permissions related so if you would like to fix this then run arm with the same user as tor (ie, "sudo -u <tor user> arm").
+msg.unknown_term
+|Unknown $TERM: ({term})
+|Either update your terminfo database or run arm using "TERM=xterm arm".
+|
+
# Important tor configuration options (shown by default)
config.important BandwidthRate
config.important BandwidthBurst
diff --git a/arm/starter.py b/arm/starter.py
index d53f611..757cf04 100644
--- a/arm/starter.py
+++ b/arm/starter.py
@@ -48,6 +48,7 @@ CONFIG = stem.util.conf.config_dict("arm", {
'msg.config_not_found': '',
'msg.unable_to_read_config': '',
'msg.unable_to_determine_pid': '',
+ 'msg.unknown_term': '',
})
# Our default arguments. The _get_args() function provides a named tuple of
@@ -402,10 +403,8 @@ def main():
curses.wrapper(arm.controller.start_arm)
except UnboundLocalError as exc:
if os.environ['TERM'] != 'xterm':
- shutdownDaemons()
- print 'Unknown $TERM: (%s)' % os.environ['TERM']
- print 'Either update your terminfo database or run arm using "TERM=xterm arm".'
- print
+ arm.controller.shutdownDaemons()
+ print CONFIG['msg.unknown_term'].format(term = os.environ['TERM'])
else:
raise exc
except KeyboardInterrupt:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits