chiark / gitweb /
common: don't crash if an sdk binary is not found
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 24 Oct 2015 15:02:53 +0000 (17:02 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 24 Oct 2015 15:02:53 +0000 (17:02 +0200)
fdroidserver/common.py

index 547b05625489912535070017ba004b54970f63a6..b668ef29a09d0dfc3c71e9ab0cf7aacbdccfd20c 100644 (file)
@@ -1581,7 +1581,11 @@ def SdkToolsPopen(commands, cwd=None, output=True):
     cmd = commands[0]
     if cmd not in config:
         config[cmd] = find_sdk_tools_cmd(commands[0])
-    return FDroidPopen([config[cmd]] + commands[1:],
+    abscmd = config[cmd]
+    if abscmd is None:
+        logging.critical("Could not find '%s' on your system" % cmd)
+        sys.exit(1)
+    return FDroidPopen(abscmd + commands[1:],
                        cwd=cwd, output=output)