From 60f5184ab6031730c50612aa70995918274337bd Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 18 Feb 2012 16:36:43 -0600 Subject: [PATCH] Update parse_svn_status_xml() to use defensive conditional rather than assert for base_dir prefix checking --- svn2svn/svnclient.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/svn2svn/svnclient.py b/svn2svn/svnclient.py index 9761648..de9d799 100644 --- a/svn2svn/svnclient.py +++ b/svn2svn/svnclient.py @@ -155,8 +155,7 @@ def parse_svn_status_xml(xml_string, base_dir=None, ignore_externals=False): for entry in tree.findall('.//entry'): d = {} path = entry.get('path') - if base_dir is not None: - assert os.path.normcase(path).startswith(base_dir) + if base_dir is not None and os.path.normcase(path).startswith(base_dir): path = path[len(base_dir):].lstrip('/\\') d['path'] = path wc_status = entry.find('wc-status') -- 2.45.2