From ba054b9bc1e2767a1528eebe1f65aecd16f4416d Mon Sep 17 00:00:00 2001 From: AloneMonkey Date: Thu, 11 Oct 2018 22:03:30 +0800 Subject: [PATCH] Exit when something goes wrong --- dump.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.py b/dump.py index 9c9824a..c4656bc 100755 --- a/dump.py +++ b/dump.py @@ -187,8 +187,7 @@ def get_applications(device): try: applications = device.enumerate_applications() except Exception as e: - print('Failed to enumerate applications: %s' % e) - return + sys.exit('Failed to enumerate applications: %s' % e) return applications