diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2006-07-22 00:04:35 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2006-07-22 00:04:35 +0000 |
commit | 636bbe354ea42794226eccb9556f53366bdd1060 (patch) | |
tree | 0dfa511399765f23fd793354514ada3f7e167919 | |
parent | 1900524954037f7665e5331db6b48db17f17966b (diff) | |
download | mgarepo-636bbe354ea42794226eccb9556f53366bdd1060.tar mgarepo-636bbe354ea42794226eccb9556f53366bdd1060.tar.gz mgarepo-636bbe354ea42794226eccb9556f53366bdd1060.tar.bz2 mgarepo-636bbe354ea42794226eccb9556f53366bdd1060.tar.xz mgarepo-636bbe354ea42794226eccb9556f53366bdd1060.zip |
- changed svn.py to raise SVNError, instead of pysvn.Client, so that
subversion error messages can be properly shown to the user
-rw-r--r-- | RepSys/svn.py | 11 |
1 files 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 |