From 5df13bcb8cebe23bd9f59d6700cd064738bd255e Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 5 Dec 2020 14:24:50 +0100 Subject: [PATCH] Catch exception when testing find_sdk_tools_cmd In 1c7df94e find_sdk_tools_cmd was changed to throw an FDroidException when the sdk tools where not found instead of returning None. --- tests/common.TestCase | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/common.TestCase b/tests/common.TestCase index d42bfe85..4ba80c0d 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -92,10 +92,12 @@ class CommonTest(unittest.TestCase): if os.path.exists(os.path.join(os.getenv('ANDROID_HOME'), 'tools', 'android')): tools.append('android') for cmd in tools: - path = fdroidserver.common.find_sdk_tools_cmd(cmd) - if path is not None: + try: + path = fdroidserver.common.find_sdk_tools_cmd(cmd) self.assertTrue(os.path.exists(path)) self.assertTrue(os.path.isfile(path)) + except fdroidserver.exception.FDroidException: + pass def test_find_sdk_tools_cmd(self): fdroidserver.common.config = dict()