Dan Kenigsberg has posted comments on this change.

Change subject: network: allow custom bondOption
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/40882/2/vdsm/network/models.py
File vdsm/network/models.py:

Line 282:         only for purpose of hooks """
Line 283:         d_opts = dict(opt.split('=', 1) for opt in options.split())
Line 284:         try:
Line 285:             d_opts.pop('custom')
Line 286:             d_opts = ['%s=%s' % (key, value) for key, value in 
d_opts.items()]
d_opts was a dictionary, let us not overwrite it with a list (which can be 
completely replace by a generator expression)

Also, this code is not expected to raise KeyError, and thus should live in the 
"else" clause of this try-block.

alternatively, use

  if d_opts.pop('custom', None) is not None:

which I find simpler.
Line 287:             return ' '.join(d_opts)
Line 288:         except KeyError:
Line 289:             return options
Line 290: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ace532d959bc3195a8a92b4536bdc0062bc7d1d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to