chiark / gitweb /
Don't crash if no auto name is found
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 14 Nov 2015 21:05:28 +0000 (22:05 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 14 Nov 2015 21:05:28 +0000 (22:05 +0100)
fdroidserver/checkupdates.py

index 2fd3d3cd747ece69e730d065f4d97966c9342937..c68b75530deed02afe231fbf2ce7c2eda84ac19d 100644 (file)
@@ -350,12 +350,15 @@ def fetch_autoname(app, tag):
             flavours = app['builds'][-1]['gradle']
 
     logging.debug("...fetch auto name from " + build_dir)
+    new_name = None
     for subdir in possible_subdirs(app):
         if subdir == '.':
             root_dir = build_dir
         else:
             root_dir = os.path.join(build_dir, subdir)
         new_name = common.fetch_real_name(root_dir, flavours)
+        if new_name is not None:
+            break
     commitmsg = None
     if new_name:
         logging.debug("...got autoname '" + new_name + "'")