diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-10-06 16:10:17 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-10-06 16:10:17 +0300 |
commit | 54fe7d25ba0f434987d92884e92c7825f9189abd (patch) | |
tree | 48972283a09999304cfcd3d22ad4b01ff780c1b1 | |
parent | d907beb2bdb4682506452c47ccdbb6f12a570159 (diff) | |
download | maucl-54fe7d25ba0f434987d92884e92c7825f9189abd.tar.gz maucl-54fe7d25ba0f434987d92884e92c7825f9189abd.tar.bz2 maucl-54fe7d25ba0f434987d92884e92c7825f9189abd.zip |
Better
-rwxr-xr-x | mowgli.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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']] |