Exit when something goes wrong

This commit is contained in:
AloneMonkey 2018-10-11 22:03:30 +08:00
parent 89021072c2
commit ba054b9bc1
1 changed files with 1 additions and 2 deletions

View File

@ -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