From: Fredrik Tolf Date: Sun, 4 May 2014 20:30:30 +0000 (+0200) Subject: Don't crash on tag listing when a manga has ceased to exist. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=acdde6cabb481343d32450ac88873cf0ee063c9a;p=automanga.git Don't crash on tag listing when a manga has ceased to exist. --- diff --git a/automanga b/automanga index 98b3c9b..a3e7af4 100755 --- a/automanga +++ b/automanga @@ -79,8 +79,11 @@ def main(): if listtag is not None: if profile is not None: for mprof in profile.bytag(listtag): - mng = mprof.open() - sys.stdout.write("%s %s: \"%s\"\n" % (mprof.libnm, mprof.id, mng.name)) + try: + mng = mprof.open() + sys.stdout.write("%s %s: \"%s\"\n" % (mprof.libnm, mprof.id, mng.name)) + except KeyError: + sys.stdout.write("%s %s: no longer exists\n" % (mprof.libnm, mprof.id)) return if alias and (alias.find('=') > 0):