chiark / gitweb /
Don't crash if an <application> has no android:label
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 3 Jun 2015 16:30:31 +0000 (18:30 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 3 Jun 2015 16:30:31 +0000 (18:30 +0200)
fdroidserver/common.py

index c525a86e337093a89d7f0298baf7d303a31b92dd..7a2c6938f569b6a3221d066fff4b53cc4378242e 100644 (file)
@@ -913,6 +913,8 @@ def fetch_real_name(app_dir, flavours):
         logging.debug("fetch_real_name: Checking manifest at " + path)
         xml = parse_xml(path)
         app = xml.find('application')
+        if "{http://schemas.android.com/apk/res/android}label" not in app.attrib:
+            continue
         label = app.attrib["{http://schemas.android.com/apk/res/android}label"]
         result = retrieve_string(app_dir, label)
         if result: