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 72850ce..511d189 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: