[Solo] try parsing arguments even when superuser access is required

This makes possible to print possible parser error messages without
requiring superuser credentials.
This commit is contained in:
Fabio Erculiani
2012-09-30 09:40:17 +02:00
parent 865813734b
commit 12221f6e2e
+4
View File
@@ -321,5 +321,9 @@ def main():
raise SystemExit(exit_st)
else:
# execute this anyway so that commands are
# incomplete or invalid, the command error
# message will take precedence.
_func, _func_args = cmd_obj.parse()
print_error(_("superuser access required"))
raise SystemExit(1)