aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-10-06 16:10:17 +0300
committerFilipp Lepalaan <filipp@mac.com>2016-10-06 16:10:17 +0300
commit54fe7d25ba0f434987d92884e92c7825f9189abd (patch)
tree48972283a09999304cfcd3d22ad4b01ff780c1b1
parentd907beb2bdb4682506452c47ccdbb6f12a570159 (diff)
downloadmaucl-54fe7d25ba0f434987d92884e92c7825f9189abd.tar.gz
maucl-54fe7d25ba0f434987d92884e92c7825f9189abd.tar.bz2
maucl-54fe7d25ba0f434987d92884e92c7825f9189abd.zip
Better
-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']]