Merge "Use modern Python exception syntax"

This commit is contained in:
Conley Owens
2012-10-25 10:03:36 -07:00
committed by Gerrit Code Review
10 changed files with 32 additions and 32 deletions

View File

@ -1077,7 +1077,7 @@ class Project(object):
try:
self._Checkout(revid, quiet=True)
except GitError, e:
except GitError as e:
syncbuf.fail(self, e)
return
self._CopyFiles()
@ -1099,7 +1099,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()
@ -1184,7 +1184,7 @@ class Project(object):
try:
self._ResetHard(revid)
self._CopyFiles()
except GitError, e:
except GitError as e:
syncbuf.fail(self, e)
return
else:
@ -1901,7 +1901,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:
@ -1964,7 +1964,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: