SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V"
(b) V is now limited to a simple name (local variable)
(c) V is now deleted at the end of the except block
diff --git a/Demo/pdist/cvslock.py b/Demo/pdist/cvslock.py
index 8f6d008..6484e71 100755
--- a/Demo/pdist/cvslock.py
+++ b/Demo/pdist/cvslock.py
@@ -129,7 +129,7 @@
self.lockdir = self.cvslck
os.mkdir(self.cvslck, 0777)
return
- except os.error, msg:
+ except os.error as msg:
self.lockdir = None
if msg[0] == EEXIST:
try:
@@ -234,7 +234,7 @@
for r in repositories:
try:
locks.append(WriteLock(r, 0))
- except Locked, instance:
+ except Locked as instance:
del locks
break
else: