diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-04-26 16:31:13 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-04-26 16:31:13 +0100 |
commit | d93908860b7d22388b1ace5082c197b6925752cb (patch) | |
tree | 77aa2ec202c38eaa4122cd2bcba0b5300f6a95b2 /sosreport | |
parent | fbbb6ace22fe97928f78d0058559defeccc472cc (diff) | |
download | sos-d93908860b7d22388b1ace5082c197b6925752cb.tar.gz |
Fix UnboundLocalError during command output substitution
Plugin.do_cmd_output_sub() assumes that the list of executed
commands is non-empty if the list of commands requested is
non-empty. This can be false (e.g. when a command is run
speculatively and the binary is not present) leading to an
unbound variable exception as the code never sets the variable
used as the return value:
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 23, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/sos/sosreport.py", line 1154, in main
sos.execute()
UnboundLocalError: local variable 'replacements' referenced before assignment
> /usr/lib/python2.7/dist-packages/sos/plugins/__init__.py(197)do_cmd_output_sub()
-> return replacements
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'sosreport')
0 files changed, 0 insertions, 0 deletions