Change in vdsm[master]: Update except syntax according to pep3110.
by asegurap@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 3: Verified
Thanks for the catches Zhou Zheng. Here goes the gitpydiff:
antoni@nx01 ~/code/vdsm> gitpydiff
checking contrib/nfs-check.py
checking tests/apiTests.py
checking tests/miscTests.py
checking vds_bootstrap/vds_bootstrap.py
checking vdsm/API.py
checking vdsm/BindingXMLRPC.py
checking vdsm/caps.py
checking vdsm/clientIF.py
checking vdsm/configNetwork.py
checking vdsm/gluster/cli.py
checking vdsm/kaxmlrpclib.py
checking vdsm/libvirtconnection.py
checking vdsm/libvirtvm.py
checking vdsm/mkimage.py
checking vdsm/netinfo.py
checking vdsm/storage/blockSD.py
checking vdsm/storage/blockVolume.py
checking vdsm/storage/dispatcher.py
checking vdsm/storage/domainMonitor.py
checking vdsm/storage/fileSD.py
checking vdsm/storage/fileUtils.py
checking vdsm/storage/fileVolume.py
checking vdsm/storage/hsm.py
checking vdsm/storage/image.py
2 difference(s)
first file: vdsm/storage/image.py
second file: /tmp/pydiff/vdsm/storage/image.py
((921, AssName('e', 'OP_ASSIGN')), ('921 + -', None))
((955, AssName('e', 'OP_ASSIGN')), ('955 + -', None))
checking vdsm/storage/imageRepository/formatConverter.py
checking vdsm/storage/lvm.py
checking vdsm/storage/misc.py
checking vdsm/storage/remoteFileHandler.py
2 difference(s)
first file: vdsm/storage/remoteFileHandler.py
second file: /tmp/pydiff/vdsm/storage/remoteFileHandler.py
((399, AssName('ex', 'OP_ASSIGN')), ('399 + -', None))
((405, AssName('ex', 'OP_ASSIGN')), ('405 + -', None))
checking vdsm/storage/resourceFactories.py
1 difference(s)
first file: vdsm/storage/resourceFactories.py
second file: /tmp/pydiff/vdsm/storage/resourceFactories.py
((179, AssName('e', 'OP_ASSIGN')), ('179 + -', None))
checking vdsm/storage/resourceManager.py
4 difference(s)
first file: vdsm/storage/resourceManager.py
second file: /tmp/pydiff/vdsm/storage/resourceManager.py
((824, AssName('ex', 'OP_ASSIGN')), ('824 + -', None))
((827, AssName('ex', 'OP_ASSIGN')), ('827 + -', None))
((872, AssName('ex', 'OP_ASSIGN')), ('872 + -', None))
((876, AssName('ex', 'OP_ASSIGN')), ('876 + -', None))
checking vdsm/storage/safelease.py
checking vdsm/storage/sp.py
1 difference(s)
first file: vdsm/storage/sp.py
second file: /tmp/pydiff/vdsm/storage/sp.py
((300, AssName('e', 'OP_ASSIGN')), ('300 + -', None))
checking vdsm/storage/storageServer.py
checking vdsm/storage/storage_mailbox.py
checking vdsm/storage/task.py
checking vdsm/storage/taskManager.py
checking vdsm/storage/volume.py
checking vdsm/supervdsm.py
checking vdsm/supervdsmServer.py
checking vdsm/tc.py
checking vdsm/utils.py
checking vdsm/vm.py
checking vdsm_api/BindingJsonRpc.py
checking vdsm_api/Bridge.py
checking vdsm_cli/vdsClient.py
checking vdsm_reg/createDaemon.py
checking vdsm_reg/deployUtil.py.in
checking vdsm_reg/register-to-engine.py
antoni@nx01 ~/code/vdsm>
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/712/ (2/2)
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/747/ (1/2)
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by asegurap@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 2:
Completely right. My sed script ingored a few cases it seems. I will upload a fix.
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 2: (4 inline comments)
....................................................
File vdsm_cli/vdsClient.py
Line 2428: if code != 0:
Line 2429: code = 1
Line 2430: print message
Line 2431: sys.exit(code)
Line 2432: except (TypeError, IndexError, ValueError), e:
Is this one to be changed as well?
Line 2433: print "Error using command:", e, "\n"
Line 2434: print command
Line 2435: for line in commands[command][1]:
Line 2436: print '\t' + line
....................................................
File vdsm_reg/vdsm-reg-setup.in
Line 312: sys.exit(1)
Line 313: elif o == "-l":
Line 314: daemonize = False
Line 315: except getopt.GetoptError,e:
Line 316: print "ERROR: '%s'"%(e.msg)
Does it need to change to the following?
except getopt.GetoptError as e:
Line 317: usage()
Line 318: sys.exit(1)
....................................................
File vdsm/storage/misc.py
Line 1383:
Line 1384: while True:
Line 1385: try:
Line 1386: return pollfun(timeout)
Line 1387: except (IOError, select.error), e:
Does it need to change to the following?
except (IOError, select.error) as e:
Line 1388: if e.args[0] != errno.EINTR:
Line 1389: raise
Line 1390: timeout = max(0, endtime - time.time())
Line 1391:
....................................................
File vdsm/storage/resourceFactories.py
Line 171: volUUID, lockType,
Line 172: timeout=self.resource_default_timeout)
Line 173:
Line 174: volResourcesList.append(volRes)
Line 175: except (rm.RequestTimedOutError, se.ResourceAcqusitionFailed), e:
Does it need to change to the following?
except (rm.RequestTimedOutError, se.ResourceAcqusitionFailed) as e:
Line 176: log.debug("Cannot acquire volume resource (%s)", str(e))
Line 177: failed = True
Line 178: raise
Line 179: except Exception:
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: seboolsetup: catch RuntimeError expection
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: seboolsetup: catch RuntimeError expection
......................................................................
seboolsetup: catch RuntimeError expection
if selinux is disabled do not trow RuntimeError trying to use
selinux module.
Change-Id: I538b028259f81a792eab88e9a281cbd81aad0312
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893065
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm-tool/seboolsetup.py
1 file changed, 12 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/10892/1
diff --git a/vdsm-tool/seboolsetup.py b/vdsm-tool/seboolsetup.py
index 437da68..482fa6e 100644
--- a/vdsm-tool/seboolsetup.py
+++ b/vdsm-tool/seboolsetup.py
@@ -18,7 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
-import seobject
+import selinux
from vdsm.tool import expose
SEBOOL_ENABLED = "on"
@@ -36,6 +36,7 @@
def setup_booleans(status):
+ import seobject
sebool_obj = seobject.booleanRecords()
sebool_status = sebool_obj.get_all()
@@ -54,10 +55,18 @@
@expose("sebool-config")
def sebool_config():
"""Enable the required selinux booleans"""
- setup_booleans(True)
+ try:
+ setup_booleans(True)
+ except RuntimeError, e:
+ if selinux.is_selinux_enabled() == 1:
+ raise e
@expose("sebool-unconfig")
def sebool_unconfig():
"""Disable the required selinux booleans"""
- setup_booleans(False)
+ try:
+ setup_booleans(False)
+ except RuntimeError, e:
+ if selinux.is_selinux_enabled() == 1:
+ raise e
--
To view, visit http://gerrit.ovirt.org/10892
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I538b028259f81a792eab88e9a281cbd81aad0312
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by asegurap@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 2:
Agreed. Thanks a lot Ewoud for the reviews!
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by ewoud@kohlvanwijngaarden.nl
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 2: Looks good to me, but someone else must approve
I think this should be merged fast because there's a lot of room for conflicts.
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months
Change in vdsm[master]: Update except syntax according to pep3110.
by asegurap@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Update except syntax according to pep3110.
......................................................................
Patch Set 2: Verified
Added a lot of missing ones in the form of:
except blah.foo, moo:
Removed unused assignments of exceptions as per Ewoud's suggestion.
antoni@nx01 ~/code/vdsm> gitpydiff
checking contrib/nfs-check.py
checking tests/apiTests.py
checking tests/miscTests.py
checking vds_bootstrap/vds_bootstrap.py
checking vdsm/API.py
checking vdsm/BindingXMLRPC.py
checking vdsm/caps.py
checking vdsm/clientIF.py
checking vdsm/configNetwork.py
checking vdsm/gluster/cli.py
checking vdsm/kaxmlrpclib.py
checking vdsm/libvirtconnection.py
checking vdsm/libvirtvm.py
checking vdsm/mkimage.py
checking vdsm/netinfo.py
checking vdsm/storage/blockSD.py
checking vdsm/storage/blockVolume.py
checking vdsm/storage/dispatcher.py
checking vdsm/storage/domainMonitor.py
checking vdsm/storage/fileSD.py
checking vdsm/storage/fileUtils.py
checking vdsm/storage/fileVolume.py
checking vdsm/storage/hsm.py
checking vdsm/storage/image.py
2 difference(s)
first file: vdsm/storage/image.py
second file: /tmp/pydiff/vdsm/storage/image.py
((921, AssName('e', 'OP_ASSIGN')), ('921 + -', None))
((955, AssName('e', 'OP_ASSIGN')), ('955 + -', None))
checking vdsm/storage/imageRepository/formatConverter.py
checking vdsm/storage/lvm.py
checking vdsm/storage/misc.py
checking vdsm/storage/remoteFileHandler.py
2 difference(s)
first file: vdsm/storage/remoteFileHandler.py
second file: /tmp/pydiff/vdsm/storage/remoteFileHandler.py
((399, AssName('ex', 'OP_ASSIGN')), ('399 + -', None))
((405, AssName('ex', 'OP_ASSIGN')), ('405 + -', None))
checking vdsm/storage/resourceFactories.py
1 difference(s)
first file: vdsm/storage/resourceFactories.py
second file: /tmp/pydiff/vdsm/storage/resourceFactories.py
((179, AssName('e', 'OP_ASSIGN')), ('179 + -', None))
checking vdsm/storage/resourceManager.py
4 difference(s)
first file: vdsm/storage/resourceManager.py
second file: /tmp/pydiff/vdsm/storage/resourceManager.py
((824, AssName('ex', 'OP_ASSIGN')), ('824 + -', None))
((827, AssName('ex', 'OP_ASSIGN')), ('827 + -', None))
((872, AssName('ex', 'OP_ASSIGN')), ('872 + -', None))
((876, AssName('ex', 'OP_ASSIGN')), ('876 + -', None))
checking vdsm/storage/safelease.py
checking vdsm/storage/sp.py
1 difference(s)
first file: vdsm/storage/sp.py
second file: /tmp/pydiff/vdsm/storage/sp.py
((300, AssName('e', 'OP_ASSIGN')), ('300 + -', None))
checking vdsm/storage/storageServer.py
checking vdsm/storage/storage_mailbox.py
checking vdsm/storage/task.py
checking vdsm/storage/taskManager.py
checking vdsm/storage/volume.py
checking vdsm/supervdsm.py
checking vdsm/supervdsmServer.py
checking vdsm/tc.py
checking vdsm/utils.py
checking vdsm/vm.py
checking vdsm_api/BindingJsonRpc.py
checking vdsm_api/Bridge.py
checking vdsm_cli/vdsClient.py
checking vdsm_reg/createDaemon.py
checking vdsm_reg/deployUtil.py.in
checking vdsm_reg/register-to-engine.py
antoni@nx01 ~/code/vdsm>
--
To view, visit http://gerrit.ovirt.org/10942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c4ac78dace34a41e1afb9f6560889ad9bd34ddf
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud(a)kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 4 months