Oved Ourfali has posted comments on this change.

Change subject: cli: Raise an error if identifier is not specified in /show 
command #855750
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File src/ovirtcli/command/show.py
Line 119: 
Line 120:         if len(args) < 2 and (len(opts) == 0 or
Line 121:                               (len(opts) == 1
Line 122:                                and
Line 123:                                
opts.keys()[0].endswith('-identifier'))):
This is not clear enough (at least to me). So will probably won't be clear for 
others reading the code.
Can you perhaps add a comment here to say what you're testing for?

Also, I saw that the string "identifier" appears in other location, so consider 
putting it in some constant.
Line 124:             self.error(Messages.Error.NO_IDENTIFIER % args[0])
Line 125: 
Line 126:         types = self.get_singular_types(method='get')
Line 127:         obj = self.get_object(typ=args[0],


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0c7b99d008d02fbee19cc133c1bc4f728506f6d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to