chiark / gitweb /
import: fix import -u from fdroiddata
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 15 Sep 2015 21:06:31 +0000 (14:06 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 15 Sep 2015 21:06:31 +0000 (14:06 -0700)
Have -u take precedence over .git checking to fix import -u being run from
fdroiddata.

fdroidserver/import.py

index c215942b3bd5735391edb6d13f1a2d4283b5a801..ce19bd543f1eaef4ce0458a811873d153c370cf4 100644 (file)
@@ -180,12 +180,12 @@ def main():
     root_dir = None
     src_dir = None
 
-    if os.path.isdir('.git'):
+    if options.url:
+        root_dir, src_dir = get_metadata_from_url(app, options.url)
+    elif os.path.isdir('.git'):
         if options.url:
             app['Web Site'] = options.url
         root_dir = get_subdir(os.getcwd())
-    elif options.url:
-        root_dir, src_dir = get_metadata_from_url(app, options.url)
     else:
         logging.error("Specify project url.")
         sys.exit(1)