mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-06-17 16:37:40 +08:00
Merge "Use modern Python exception syntax"
This commit is contained in:
10
project.py
10
project.py
@ -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:
|
||||
|
Reference in New Issue
Block a user