Change in vdsm[master]: convert print statements to functions
danken at redhat.com
danken at redhat.com
Mon Apr 20 14:35:22 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: convert print statements to functions
......................................................................
Patch Set 4: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/37997/4/client/vdsClient.py
File client/vdsClient.py:
Line 761: else:
Line 762: print('pvlist:')
Line 763: for item in info['info'][entry]:
Line 764: for i in item.keys():
Line 765: print("%s = %s " % (i, item[i]), end=' ')
> why is 'end' needed here?
to implement the original "do not print newline" semantics of the original trailing coma
Line 766: print()
Line 767: return 0, ''
Line 768:
Line 769: def createVG(self, args):
https://gerrit.ovirt.org/#/c/37997/4/vdsm_hooks/ethtool_options/ethtool_options.py
File vdsm_hooks/ethtool_options/ethtool_options.py:
Line 62: print('splits into: ')
Line 63: for subcmd in _parse_into_subcommands(opts['ethtool_opts'].split()):
Line 64: command = ([ETHTOOL_BINARY.cmd] + [subcmd.name, subcmd.device] +
Line 65: subcmd.flags)
Line 66: print((' '), end=' ')
> why is 'end' needed here?
this test expects to output several "command" in one indented line. I don't like to change the behaviour nor anything but the original "print,".
the double parentheses is needless ugliness, and would be dropped.
Line 67: print(command)
Line 68:
Line 69: # Test with the correct nics
Line 70: nics = ('em1', 'em2')
--
To view, visit https://gerrit.ovirt.org/37997
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I75222d243f27b557ea4b87522b9cf2113534e376
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list