From a5be53f9c809009e67f217c00b8f30246aacc237 Mon Sep 17 00:00:00 2001 From: Sarah Owens Date: Sun, 9 Sep 2012 15:37:57 -0700 Subject: Use modern Python exception syntax "except Exception as e" instead of "except Exception, e" This is part of a transition to supporting Python 3. Python >= 2.6 support "as" syntax. Note: this removes Python 2.5 support. Change-Id: I309599f3981bba2b46111c43102bee38ff132803 --- project.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 472b1d32..96feb94b 100644 --- a/project.py +++ b/project.py @@ -1044,7 +1044,7 @@ class Project(object): try: self._Checkout(revid, quiet=True) - except GitError, e: + except GitError as e: syncbuf.fail(self, e) return self._CopyFiles() @@ -1066,7 +1066,7 @@ class Project(object): branch.name) try: self._Checkout(revid, quiet=True) - except GitError, e: + except GitError as e: syncbuf.fail(self, e) return self._CopyFiles() @@ -1151,7 +1151,7 @@ class Project(object): try: self._ResetHard(revid) self._CopyFiles() - except GitError, e: + except GitError as e: syncbuf.fail(self, e) return else: @@ -1723,7 +1723,7 @@ class Project(object): continue try: os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst) - except OSError, e: + except OSError as e: if e.errno == errno.EPERM: raise GitError('filesystem must support symlinks') else: @@ -1786,7 +1786,7 @@ class Project(object): os.symlink(os.path.relpath(src, os.path.dirname(dst)), dst) else: raise GitError('cannot overwrite a local work tree') - except OSError, e: + except OSError as e: if e.errno == errno.EPERM: raise GitError('filesystem must support symlinks') else: -- cgit v1.2.3-54-g00ecf