Change in vdsm[master]: build: Forbid bare exepct

nsoffer at redhat.com nsoffer at redhat.com
Tue Dec 17 10:18:25 UTC 2013


Nir Soffer has uploaded a new change for review.

Change subject: build: Forbid bare exepct
......................................................................

build: Forbid bare exepct

Using bare except is bad practice and is never required. We should
disallow this in new code. This patch ensure that your build will break
if your patch added a bare except.

Change-Id: I5b7f33b6eb1c90610b3a5d053ba65ce3fc6b74fa
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M Makefile.am
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/22456/1

diff --git a/Makefile.am b/Makefile.am
index 9b1a3c9..d25d395 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,6 +79,10 @@
 	'lv' from line .*"
 
 check-local:
+	if git show | grep 'except:'; then \
+		echo "error: empty except: is not allowed!"; \
+		exit 1; \
+	fi
 	find . -path './.git' -prune -type f -o \
 		-name '*.py' -o -name '*.py.in'  | xargs $(PYFLAKES) | \
 		grep -w -v $(SKIP_PYFLAKES_ERR) | \


-- 
To view, visit http://gerrit.ovirt.org/22456
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b7f33b6eb1c90610b3a5d053ba65ce3fc6b74fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list