From: Hans-Christoph Steiner Date: Wed, 6 Dec 2017 12:41:03 +0000 (+0100) Subject: init: fix test for aapt when no aapt has been found X-Git-Tag: 1.0.0~43^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1a77c6af3863c76192e1b472183a8c6ae9679f71;p=fdroidserver.git init: fix test for aapt when no aapt has been found Just give a proper error message rather than this stack trace: Traceback (most recent call last): File "/home/hans/code/fdroid/server/fdroid", line 156, in main() File "/home/hans/code/fdroid/server/fdroid", line 132, in main mod.main() File "/export/share/code/fdroid/server/fdroidserver/init.py", line 148, in main if os.path.isfile(aapt): File "/usr/lib/python3.5/genericpath.py", line 30, in isfile st = os.stat(path) --- diff --git a/fdroidserver/init.py b/fdroidserver/init.py index 9d03e0b9..7b59bdb7 100644 --- a/fdroidserver/init.py +++ b/fdroidserver/init.py @@ -144,7 +144,7 @@ def main(): if os.path.isfile(os.path.join(d, 'aapt')): aapt = os.path.join(d, 'aapt') break - if os.path.isfile(aapt): + if aapt and os.path.isfile(aapt): dirname = os.path.basename(os.path.dirname(aapt)) if dirname == 'build-tools': # this is the old layout, before versioned build-tools