Change in vdsm[master]: convert print statements to functions

fromani at redhat.com fromani at redhat.com
Fri Mar 27 12:49:16 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: convert print statements to functions
......................................................................


Patch Set 4:

(3 comments)

one more __future__ import is misplaced, plus a question about the usage of 'end' parameter

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?
Line 766:                     print()
Line 767:         return 0, ''
Line 768: 
Line 769:     def createVG(self, args):


https://gerrit.ovirt.org/#/c/37997/4/contrib/nfs-check.py
File contrib/nfs-check.py:

Line 1: from __future__ import print_function
let's move this below the copyright boilerplate
Line 2: # Copyright 2012 Red Hat, Inc.
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by


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?
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