fix indent error and refine repo url pattern
authorZhang Qiang <qiang.z.zhang@intel.com>
Mon, 30 Jul 2012 08:48:02 +0000 (16:48 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 31 Jul 2012 07:59:14 +0000 (15:59 +0800)
gitbuildsys/cmd_build.py

index 72850cef304a0244457ebabcfd97a4d8de72cc15..511d1890d1e07b5d61d42f4c66924a590d2c8a50 100644 (file)
@@ -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: