roomservice: Set exit status if we fail to fetch data from github
Change-Id: I6f69f1df1ba7d28e68c5961b405a54e209643db3 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
parent
1c1b8c2355
commit
d1ff101da0
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (C) 2012-2013, The CyanogenMod Project
|
||||
# (C) 2017, The LineageOS Project
|
||||
# (C) 2017-2018,2020-2021, The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -78,10 +78,10 @@ if not depsonly:
|
||||
result = json.loads(urllib.request.urlopen(githubreq).read().decode())
|
||||
except urllib.error.URLError:
|
||||
print("Failed to search GitHub")
|
||||
sys.exit()
|
||||
sys.exit(1)
|
||||
except ValueError:
|
||||
print("Failed to parse return data from GitHub")
|
||||
sys.exit()
|
||||
sys.exit(1)
|
||||
for res in result.get('items', []):
|
||||
repositories.append(res)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user