From 4cf99030c9cadb096c6ec1d0744da6244c38c177 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Mon, 30 Jul 2012 16:48:02 +0800 Subject: [PATCH] fix indent error and refine repo url pattern --- gitbuildsys/cmd_build.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index 72850ce..511d189 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -334,10 +334,9 @@ def do(opts, args): 'following repos:\n %s' % \ (buildarch, '\n'.join(repos))) for url in repourls: - if not re.match('https?://.*?/.*', url) and \ - not (url.startswith('/') and os.path.exists(url)): - msger.error("Invalid repo url: %s" % url) - + if not re.match('https?://.*', url) and \ + not (url.startswith('/') and os.path.exists(url)): + msger.error("Invalid repo url: %s" % url) cmd += ['--repository=%s' % url] if opts.dist: -- 2.7.4