aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2006-07-21 23:49:05 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2006-07-21 23:49:05 +0000
commit1900524954037f7665e5331db6b48db17f17966b (patch)
tree05b47b2338379466a1a42c647a90736d80e4f67c
parenta46cdc5b84843f6708c9db5c1b8752a84fac8d85 (diff)
downloadmgarepo-1900524954037f7665e5331db6b48db17f17966b.tar
mgarepo-1900524954037f7665e5331db6b48db17f17966b.tar.gz
mgarepo-1900524954037f7665e5331db6b48db17f17966b.tar.bz2
mgarepo-1900524954037f7665e5331db6b48db17f17966b.tar.xz
mgarepo-1900524954037f7665e5331db6b48db17f17966b.zip
- changed behavior of the pysvn wrapper to return None instead of False,
it is more appropriate to report "errors" - fixed bug in which wrapper's log was not checking if the wrapped call to pysvn's log returned None (silented error).
-rw-r--r--RepSys/svn.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/RepSys/svn.py b/RepSys/svn.py
index 0362683..aefb8ea 100644
--- a/RepSys/svn.py
+++ b/RepSys/svn.py
@@ -54,7 +54,7 @@ class SVN:
except pysvn.ClientError:
if not ignore_errors:
raise
- return False
+ return None
finally:
self._current_message = None
self._client_lock.release()
@@ -91,6 +91,8 @@ class SVN:
def log(self, *args, **kwargs):
meth = self.__getattr__("log")
entries = meth(*args, **kwargs)
+ if entries is None:
+ return
for entrydic in entries:
entry = SVNLogEntry(entrydic["revision"].number,
entrydic["author"],
@@ -99,7 +101,7 @@ class SVN:
yield entry
def exists(self, path):
- return self.ls(path, noerror=1) is not False
+ return self.ls(path, noerror=1) is not None
def _edit_message(self, message):
# argh!