You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once #2057 has been applied, some servicemon checker runs crash with a strange UnboundLocalError
Expected behavior
No unhandled exceptions should leak through plugin runs.
Environment (please complete the following information):
NAV version installed: 5.0.2
Traceback
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_innerself.run()
File "/opt/venvs/nav/lib/python3.5/site-packages/nav/statemon/RunQueue.py", line 67, in runself.execute(checker)
File "/opt/venvs/nav/lib/python3.5/site-packages/nav/statemon/RunQueue.py", line 80, in execute
checker.run()
File "/opt/venvs/nav/lib/python3.5/site-packages/nav/statemon/abstractchecker.py", line 109, in run
status, info =self.execute_test()
File "/opt/venvs/nav/lib/python3.5/site-packages/nav/statemon/abstractchecker.py", line 194, in execute_testreturn status, info
UnboundLocalError: local variable 'info' referenced before assignment
Additional context
The problem appears to stem from a change in the way except clauses are handled in Python 3 vs Python 2. The exception handler in the affected code reuses the exception variable in the outer scope, but this no longer works in Python 3.
The text was updated successfully, but these errors were encountered:
lunkwill42
changed the title
[BUG] some servicemon c hecker runs crash with a UnboundLocalError
[BUG] some servicemon checker runs crash with a UnboundLocalError
Dec 18, 2019
Describe the bug
Once #2057 has been applied, some servicemon checker runs crash with a strange
UnboundLocalError
Expected behavior
No unhandled exceptions should leak through plugin runs.
Environment (please complete the following information):
Traceback
Additional context
The problem appears to stem from a change in the way
except
clauses are handled in Python 3 vs Python 2. The exception handler in the affected code reuses the exception variable in the outer scope, but this no longer works in Python 3.The text was updated successfully, but these errors were encountered: