aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmowgli.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mowgli.py b/mowgli.py
index 961871c..b1b2fe6 100755
--- a/mowgli.py
+++ b/mowgli.py
@@ -129,11 +129,12 @@ if __name__ == '__main__':
print("* Checking for updates...")
- try:
- if os.path.exists(sys.argv[2]):
- updates = check(sys.argv[2])
- except IndexError as e:
- pass
+ if len(sys.argv) > 2:
+ if not os.path.exists(sys.argv[2]):
+ raise Exception('Invalid MAU pref file %s' % sys.argv[2])
+ updates = check(sys.argv[2])
+ else:
+ updates = check()
updates = [u for u in updates if u['needs_update']]