aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:49:18 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:49:18 +0000
commit91d55b129c0b8fb2980aaa372e053e8a3c157935 (patch)
tree5aa55b42326930352a18753a13be188e488725a0
parentbd902e2a4a1214bb34dadb58d5606888807778cc (diff)
downloadmgarepo-91d55b129c0b8fb2980aaa372e053e8a3c157935.tar
mgarepo-91d55b129c0b8fb2980aaa372e053e8a3c157935.tar.gz
mgarepo-91d55b129c0b8fb2980aaa372e053e8a3c157935.tar.bz2
mgarepo-91d55b129c0b8fb2980aaa372e053e8a3c157935.tar.xz
mgarepo-91d55b129c0b8fb2980aaa372e053e8a3c157935.zip
Make SVN.info2 to return None when the target is not versioned
-rw-r--r--RepSys/svn.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/RepSys/svn.py b/RepSys/svn.py
index 3244c3a..4b1e9da 100644
--- a/RepSys/svn.py
+++ b/RepSys/svn.py
@@ -125,12 +125,14 @@ class SVN:
def info(self, path, **kwargs):
cmd = ["info", path]
status, output = self._execsvn(local=True, *cmd, **kwargs)
- if status == 0:
+ if status == 0 and "Not a versioned resource" not in output:
return output.splitlines()
return None
def info2(self, *args, **kwargs):
lines = self.info(*args, **kwargs)
+ if lines is None:
+ return None
pairs = [[w.strip() for w in line.split(":", 1)] for line in lines]
info = dict(pairs)
return info