Michael Pasternak has posted comments on this change.

Change subject: cli: ovirt-shell does not exit when using -f option(#854519)
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

....................................................
File src/ovirtcli/shell/engineshell.py
Line 155:             self.do_connect(s)
Line 156:             if opts.file:
Line 157:                 cmd.Cmd.intro = None
Line 158:                 self.do_file(opts.file)
Line 159:                 self.exitWithStatusAndMsg(0, 'Command executed 
successfully.')
1. no need for explicit message as script can be build from series of commands 
and all commands has own exist-status

2. please invoke /exit command instead, by manual  process kill you're missing 
all cleanups /exit does such as disconnect(), etc.
Line 160:             else:
Line 161:                 self.cmdloop(clear=False)
Line 162:         else:
Line 163:             self.cmdloop()


....................................................
File src/ovirtcli/shell/filecmdshell.py
Line 46:                     line = self.owner.precmd(line)
Line 47:                     self.owner.print_line(line)
Line 48:                     self.owner.onecmd(line)
Line 49:         except Exception, e:
Line 50:             self.exitWithStatusAndMsg(e.errno, str(e))
no need for this as anyway it will exit at the end
Line 51:         finally:


-- 
To view, visit http://gerrit.ovirt.org/12212
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5441a401ed39fc7148b6001fb826b145ba66d6c7
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to