From 636bbe354ea42794226eccb9556f53366bdd1060 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Sat, 22 Jul 2006 00:04:35 +0000 Subject: - changed svn.py to raise SVNError, instead of pysvn.Client, so that subversion error messages can be properly shown to the user --- RepSys/svn.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/RepSys/svn.py b/RepSys/svn.py index aefb8ea..2eb52e8 100644 --- a/RepSys/svn.py +++ b/RepSys/svn.py @@ -9,7 +9,10 @@ import threading import tempfile import pysvn -__all__ = ["SVN", "Revision", "SVNLogEntry"] +__all__ = ["SVN", "Revision", "SVNLogEntry", "SVNError"] + +class SVNError(Error): + pass class SVNLogEntry: def __init__(self, revision, author, date): @@ -51,9 +54,9 @@ class SVN: ignore_errors = kwargs.pop("noerror", None) try: return meth(*args, **kwargs) - except pysvn.ClientError: + except pysvn.ClientError, (msg,): if not ignore_errors: - raise + raise SVNError, msg return None finally: self._current_message = None @@ -147,6 +150,6 @@ class SVN: if changed: propset(propname, newmessage, pkgdirurl, revision=revision) except pysvn.ClientError, (msg,): - raise Error, msg + raise SVNError, msg # vim:et:ts=4:sw=4 -- cgit v1.2.1