diff options
Diffstat (limited to 'Demo/pdist')
-rwxr-xr-x | Demo/pdist/FSProxy.py | 2 | ||||
-rwxr-xr-x | Demo/pdist/cmdfw.py | 4 | ||||
-rwxr-xr-x | Demo/pdist/cmptree.py | 4 | ||||
-rwxr-xr-x | Demo/pdist/cvslock.py | 4 | ||||
-rwxr-xr-x | Demo/pdist/rrcs.py | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/Demo/pdist/FSProxy.py b/Demo/pdist/FSProxy.py index a1ab635..dad4015 100755 --- a/Demo/pdist/FSProxy.py +++ b/Demo/pdist/FSProxy.py @@ -87,7 +87,7 @@ class FSProxyLocal: fs = macfs.FSSpec(name) c, t = fs.GetCreatorType() if t != 'TEXT': return 0 - except macfs.error, msg: + except macfs.error as msg: print "***", name, msg return 0 else: diff --git a/Demo/pdist/cmdfw.py b/Demo/pdist/cmdfw.py index e2edd0a..47d13bc 100755 --- a/Demo/pdist/cmdfw.py +++ b/Demo/pdist/cmdfw.py @@ -42,7 +42,7 @@ class CommandFrameWork: if args is None: args = sys.argv[1:] try: opts, args = getopt.getopt(args, self.GlobalFlags) - except getopt.error, msg: + except getopt.error as msg: return self.usage(msg) self.options(opts) if not args: @@ -62,7 +62,7 @@ class CommandFrameWork: flags = '' try: opts, args = getopt.getopt(args[1:], flags) - except getopt.error, msg: + except getopt.error as msg: return self.usage( "subcommand %s: " % cmd + str(msg)) self.ready() diff --git a/Demo/pdist/cmptree.py b/Demo/pdist/cmptree.py index fa06f5f..5031869 100755 --- a/Demo/pdist/cmptree.py +++ b/Demo/pdist/cmptree.py @@ -135,7 +135,7 @@ def compare(local, remote, mode): def sendfile(local, remote, name): try: remote.create(name) - except (IOError, os.error), msg: + except (IOError, os.error) as msg: print "cannot create:", msg return @@ -171,7 +171,7 @@ def recvfile(local, remote, name): def recvfile_real(local, remote, name): try: local.create(name) - except (IOError, os.error), msg: + except (IOError, os.error) as msg: print "cannot create:", msg return 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 @@ class Lock: 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 @@ def MultipleWriteLock(repositories, delay = DELAY): for r in repositories: try: locks.append(WriteLock(r, 0)) - except Locked, instance: + except Locked as instance: del locks break else: diff --git a/Demo/pdist/rrcs.py b/Demo/pdist/rrcs.py index 4d23e6c..540d296 100755 --- a/Demo/pdist/rrcs.py +++ b/Demo/pdist/rrcs.py @@ -22,7 +22,7 @@ def main(): raise getopt.error, "unknown command" coptset, func = commands[cmd] copts, files = getopt.getopt(rest, coptset) - except getopt.error, msg: + except getopt.error as msg: print msg print "usage: rrcs [options] command [options] [file] ..." print "where command can be:" @@ -41,7 +41,7 @@ def main(): for fn in files: try: func(x, copts, fn) - except (IOError, os.error), msg: + except (IOError, os.error) as msg: print "%s: %s" % (fn, msg) def checkin(x, copts, fn): |