diff options
author | Tilman Blumenbach | 2015-01-22 13:40:57 +0100 |
---|---|---|
committer | Tilman Blumenbach | 2015-01-22 13:40:57 +0100 |
commit | 4e1c9bd00b1da1a7cfcf7070affe7593a12dc2a2 (patch) | |
tree | 13f7b94973676893bd7c143b8d1dfdd3d932b70f | |
parent | 84d251aa294ccf5e5a0add45310d6cc93c50eb7d (diff) | |
download | aur-4e1c9bd00b1da1a7cfcf7070affe7593a12dc2a2.tar.gz |
Handle corrupt API responses.
-rwxr-xr-x | get_latest_info.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/get_latest_info.py b/get_latest_info.py index 28a0915a7898..40226968fb4c 100755 --- a/get_latest_info.py +++ b/get_latest_info.py @@ -74,6 +74,13 @@ except (requests.exceptions.RequestException, ET.ParseError) as e: ) sys.exit(2) +if version is None: + print( + "E: No version information found in API response. API may be malfunctioning.", + file=sys.stderr + ) + sys.exit(2) + if url is None: print( "E: No match for OS `%s' found." % parsed_args.os, |