]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph.in: use a differnt variable for holding thrown exception
authorKefu Chai <kchai@redhat.com>
Thu, 1 Mar 2018 09:00:58 +0000 (17:00 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Mar 2018 09:03:09 +0000 (17:03 +0800)
commit487b322b91f9ee13eb9dc5bdc79084e58ed7b38f
treec4c2bf5617d215dc5819d05056a2ea171305dce0
parent59da11b195dce6709b101b84916d18ede7c01e76
ceph.in: use a differnt variable for holding thrown exception

otherwise, we will have

$ bin/ceph osd
Traceback (most recent call last):
  File "bin/ceph", line 1178, in <module>
    retval = main()
  File "bin/ceph", line 1109, in main
    verbose)
  File "bin/ceph", line 535, in new_style_command
    valid_dict = validate_command(sigdict, cmdargs, verbose)
  File "/var/ceph/ceph/src/pybind/ceph_argparse.py", line 1083, in
validate_command
    if found or e:
UnboundLocalError: local variable 'e' referenced before assignment

when using python3

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/ceph_argparse.py