diff options
Diffstat (limited to 'morphlib/gitdir.py')
-rw-r--r-- | morphlib/gitdir.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py index 391db91f..03640a22 100644 --- a/morphlib/gitdir.py +++ b/morphlib/gitdir.py @@ -10,8 +10,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # =*= License: GPL-2 =*= @@ -707,7 +706,7 @@ class GitDirectory(object): # this ensures it will fail if the branch already exists try: return self._update_ref((ref, sha1, '0' * 40), message) - except Exception, e: + except Exception as e: raise RefAddError(self, ref, sha1, e) def update_ref(self, ref, sha1, old_sha1, message=None): @@ -727,7 +726,7 @@ class GitDirectory(object): self._check_is_sha1(old_sha1) try: return self._update_ref((ref, sha1, old_sha1), message) - except Exception, e: + except Exception as e: raise RefUpdateError(self, ref, old_sha1, sha1, e) def delete_ref(self, ref, old_sha1, message=None): @@ -745,7 +744,7 @@ class GitDirectory(object): self._check_is_sha1(old_sha1) try: return self._update_ref(('-d', ref, old_sha1), message) - except Exception, e: + except Exception as e: raise RefDeleteError(self, ref, old_sha1, e) def describe(self): |