summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-10-25 10:03:36 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-10-25 10:03:37 -0700
commit608aff7f624e35348ff9fab74bad1d6921944238 (patch)
treee1bdbb8af5927dd226d8e22dc382fd24c4cdfa5e /project.py
parent13657c407d0424d0866993bea39ed01094caa1c1 (diff)
parenta5be53f9c809009e67f217c00b8f30246aacc237 (diff)
downloadgit-repo-608aff7f624e35348ff9fab74bad1d6921944238.tar.gz
Merge "Use modern Python exception syntax"
Diffstat (limited to 'project.py')
-rw-r--r--project.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/project.py b/project.py
index 2989d380..a0889b3f 100644
--- a/project.py
+++ b/project.py
@@ -1077,7 +1077,7 @@ class Project(object):
1077 1077
1078 try: 1078 try:
1079 self._Checkout(revid, quiet=True) 1079 self._Checkout(revid, quiet=True)
1080 except GitError, e: 1080 except GitError as e:
1081 syncbuf.fail(self, e) 1081 syncbuf.fail(self, e)
1082 return 1082 return
1083 self._CopyFiles() 1083 self._CopyFiles()
@@ -1099,7 +1099,7 @@ class Project(object):
1099 branch.name) 1099 branch.name)
1100 try: 1100 try:
1101 self._Checkout(revid, quiet=True) 1101 self._Checkout(revid, quiet=True)
1102 except GitError, e: 1102 except GitError as e:
1103 syncbuf.fail(self, e) 1103 syncbuf.fail(self, e)
1104 return 1104 return
1105 self._CopyFiles() 1105 self._CopyFiles()
@@ -1184,7 +1184,7 @@ class Project(object):
1184 try: 1184 try:
1185 self._ResetHard(revid) 1185 self._ResetHard(revid)
1186 self._CopyFiles() 1186 self._CopyFiles()
1187 except GitError, e: 1187 except GitError as e:
1188 syncbuf.fail(self, e) 1188 syncbuf.fail(self, e)
1189 return 1189 return
1190 else: 1190 else:
@@ -1901,7 +1901,7 @@ class Project(object):
1901 continue 1901 continue
1902 try: 1902 try:
1903 os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst) 1903 os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
1904 except OSError, e: 1904 except OSError as e:
1905 if e.errno == errno.EPERM: 1905 if e.errno == errno.EPERM:
1906 raise GitError('filesystem must support symlinks') 1906 raise GitError('filesystem must support symlinks')
1907 else: 1907 else:
@@ -1964,7 +1964,7 @@ class Project(object):
1964 os.symlink(os.path.relpath(src, os.path.dirname(dst)), dst) 1964 os.symlink(os.path.relpath(src, os.path.dirname(dst)), dst)
1965 else: 1965 else:
1966 raise GitError('cannot overwrite a local work tree') 1966 raise GitError('cannot overwrite a local work tree')
1967 except OSError, e: 1967 except OSError as e:
1968 if e.errno == errno.EPERM: 1968 if e.errno == errno.EPERM:
1969 raise GitError('filesystem must support symlinks') 1969 raise GitError('filesystem must support symlinks')
1970 else: 1970 else: