Univention Bugzilla – Bug 9914
Traceback whild parsing command line options
Last modified: 2013-11-19 06:44:30 CET
Ruft man univention-config-registry mit der Option --keys-only ohne Angabe der Unterkommandos "search" oder "dump" auf, so erscheint folgender Traceback, der stattdessen besser die Usage-Informationen anzeigen sollte: root@master:~# univention-config-registry --keys-only Traceback (most recent call last): File "/usr/sbin/univention-config-registry", line 40, in ? ub.main(sys.argv[1:]) File "/usr/lib/python2.4/site-packages/univention/config_registry.py", line 1081, in main action = args[ 0 ] IndexError: list index out of range root@master:~#
Das Options-Parsing sollte auf das optparse-Modul aus Python umgestellt werden.
Ein weiterer Bug: root@master:~# ucr --shell Traceback (most recent call last): File "/usr/sbin/ucr", line 65, in <module> ub.main(convertToUtf8(sys.argv[1:])) File "/usr/lib/pymodules/python2.6/univention/config_registry.py", line 1620, in main action = args[ 0 ] IndexError: list index out of range
*** Bug 15969 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > Das Options-Parsing sollte auf das optparse-Modul aus Python umgestellt werden. Das würde auch Bug 22229 lösen.
(In reply to Moritz Muehlenhoff from comment #0) > root@master:~# univention-config-registry --keys-only # univention-config-registry --keys-only E: missing action, see --help (In reply to Moritz Muehlenhoff from comment #2) > root@master:~# ucr --shell # ucr --shell E: missing action, see --help (In reply to Moritz Muehlenhoff from comment #1) > Das Options-Parsing sollte auf das optparse-Modul aus Python umgestellt > werden. optparse can't handle the subcommands of ucr, while <http://docs.python.org/2.7/library/argparse.html> is only available since Python 2.7 or as a separate Debian package. If I remember correctly I tried to change UCR to OptionParser once, but had to revert the change because it subtly broke the API of UCR. I'm closing this bug, as the original two tracebacks are WORKS-FOR-ME by now. For the switch-over to OptionParser a separate bug tagged as API-change should be cloned (if this is still desired).
OK -> ucr --shell E: missing action, see --help -> univention-config-registry --keys-only E: missing action, see --help
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".