[tor-bugs] #25492 [Core Tor/Nyx]: Fix nyx crashing when failing to write torrc.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Mar 14 10:10:25 UTC 2018
#25492: Fix nyx crashing when failing to write torrc.
------------------------------+--------------------
Reporter: Guinness | Owner: atagar
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Nyx | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------
When nyx tries to write torrc and fails, the exception handling was broken
:
{{{
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/starter.py", line 118, in main
nyx.curses.start(nyx.draw_loop, acs_support =
config.get('acs_support', True), transparent_background = True, cursor =
False)
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/curses.py", line 217, in start
curses.wrapper(_wrapper)
File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/curses.py", line 215, in _wrapper
function()
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/__init__.py", line 243, in draw_loop
keybinding.handle(key)
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/panel/__init__.py", line 84, in
handle
self._action()
File "/usr/local/lib/python3.5/dist-
packages/nyx-2.0.4.dev0-py3.5.egg/nyx/panel/config.py", line 222, in
_show_write_dialog
show_message('Unable to save configuration (%s)' % exc.strerror,
HIGHLIGHT, max_wait = 2)
AttributeError: 'OperationFailed' object has no attribute 'strerror'
}}}
This commit patches this small bug, and add a more accurate exception
handling for the save_conf call.
The commit can be found here :
https://git.oudin.ml/Guinness/nyx/commit/8565384dc42b3f0faef027f890602b15513787be
.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25492>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list