From 91d55b129c0b8fb2980aaa372e053e8a3c157935 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 5 Feb 2008 20:49:18 +0000 Subject: Make SVN.info2 to return None when the target is not versioned --- RepSys/svn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'RepSys/svn.py') 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 -- cgit v1.2.1