Change in vdsm[master]: vdsClient: parse no value arguments

Alon Bar-Lev alonbl at redhat.com
Tue Sep 15 07:49:45 UTC 2015


Alon Bar-Lev has posted comments on this change.

Change subject: vdsClient: parse no value arguments
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/46133/1/client/vdsClient.py
File client/vdsClient.py:

Line 163:                                                       lambda x: x == ",")
Line 164:                 if not element]
Line 165:     args = {}
Line 166:     for arg in arg_list:
Line 167:         args[arg[0]] = arg[2] if len(arg) == 3 else ''
will that help?

 def parseArgs(args):
     lexer = shlex.shlex(args, posix=True)
     lexer.whitespace = ','
     lexer.whitespace_split = True
     ret = {}
     for c in list(lexer):
         words = c.split('=', 2)
         ret[words[0]] = '' if len(words) == 1 else words[1]
     return ret
Line 168:     return args
Line 169: 
Line 170: 
Line 171: def parseConList(args):


-- 
To view, visit https://gerrit.ovirt.org/46133
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I317cf2f9cfd83e2cb3f0c0f833350c3b95ebe7f1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list