Zhou Zheng Sheng has posted comments on this change.
Change subject: Fix PEP8 violations in vm.py
......................................................................
Patch Set 1: No score
(3 inline comments)
I just located the cases that caught my eye. The current pep8 tool can not
cover every case in PEP 8.
....................................................
File vdsm/vm.py
Line 101: config.get('vars', 'migration_downtime')
Line 102: self.status = {'status': {
Line 103: 'code': 0,
Line 104: 'message': 'Migration in process'}, 'progress': 0
Line 105: }
http://www.python.org/dev/peps/pep-0008/#indentation
"Continuation lines should align wrapped elements either vertically using
Python's implicit line joining inside parentheses, brackets and braces, or
using a hanging indent."
No:
# Arguments on first line forbidden when not using vertical alignment
foo = long_function_name(var_one, var_two,
var_three, var_four)
Line 106: threading.Thread.__init__(self)
Line 107: self._preparingMigrationEvt = False
Line 108: self._migrationCanceledEvt = False
Line 109:
Line 125: except:
Line 126: pass
Line 127: serverAddress = self.remoteHost + ':' + self.remotePort
Line 128: if config.getboolean('vars', 'ssl'):
Line 129: self.destServer = vdscli.connect(serverAddress,
useSSL=True,
Same as line 105.
Line 130: TransportClass=kaxmlrpclib.TcpkeepSafeTransport)
Line 131: else:
Line 132: self.destServer = kaxmlrpclib.Server('http://' +
serverAddress)
Line 133: self.log.debug('Destination server is: ' + serverAddress)
Line 606: self._ongoingCreations.acquire()
Line 607: self.log.debug("_ongoingCreations acquired")
Line 608: try:
Line 609: self._run()
Line 610: if self.lastStatus != 'Down' and 'recover' not in
self.conf \
http://www.python.org/dev/peps/pep-0008/#maximum-line-length
"The preferred place to break around a binary operator is after the operator,
not before it."
Line 611: and not self.cif.mom:
Line 612: # If MOM is available, we needn't tell it to
adjust KSM
Line 613: # behaviors on VM start/destroy, because the
tuning can be
Line 614: # done automatically acccording its statistical
data.
--
To view, visit http://gerrit.ovirt.org/7449
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I369a1dbfcf49cf1a8b1ac61fe88dd2fe3ea93b8e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches