* fix: pass arguments correctly in pisicli
* fix (attempt): try to finalize api in case of error
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ class PisiCLI(object):
|
||||
except ParserError:
|
||||
raise Error(_('Command line parsing error'))
|
||||
|
||||
self.command = Command.get_command(cmd_name, args)
|
||||
self.command = Command.get_command(cmd_name, args=args)
|
||||
if not self.command:
|
||||
raise Error(_("Unrecognized command: %s") % cmd_name)
|
||||
|
||||
|
||||
+1
-1
@@ -58,9 +58,9 @@ Copyright 2006 (c) Pardus
|
||||
signal.signal(signal.SIGINT, signal.SIG_IGN) # disable further interrupts
|
||||
ui = pisi.cli.CLI() # make a temporary UI
|
||||
show_traceback = False
|
||||
pisi.api.finalize()
|
||||
if isinstance(value, exceptions.KeyboardInterrupt):
|
||||
ui.error(_("Keyboard Interrupt: Exiting..."))
|
||||
pisi.api.finalize()
|
||||
sys.exit(1)
|
||||
elif isinstance(value, pisi.Error):
|
||||
ui.error(_("Program Terminated."))
|
||||
|
||||
Reference in New Issue
Block a user