Skip to content
Snippets Groups Projects
Commit f4cfa060 authored by Damian Johnson's avatar Damian Johnson
Browse files

Avoid os.putenv calls on FreeBSD

Turns out even when we suppress the exceptions it causes the interpreter to
print to stdout. Lets just avoid these calls entirely on FreeBSD. Dropping the
catch clauses since we were only doing this due to FreeBSD.
parent 68f6f573
No related branches found
No related tags found
No related merge requests found
......@@ -87,15 +87,14 @@ def main(config):
_use_unicode()
_set_process_name()
try:
os.putenv('LANG', 'C') # make subcommands (ps, netstat, etc) provide english results
except OSError:
pass
# These os.putenv calls fail on FreeBSD, and even attempting causes python to
# print the following to stdout...
#
# nyx: environment corrupt; missing value for
try:
if not stem.util.system.is_bsd():
os.putenv('LANG', 'C') # make subcommands (ps, netstat, etc) provide english results
os.putenv('ESCDELAY', '0') # make 'esc' take effect right away
except OSError:
pass
try:
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment