From: Fredrik Tolf Date: Fri, 13 Sep 2013 01:59:28 +0000 (+0200) Subject: Allow libraries to specify reasons for not finding manga. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=d39faa3fcca949d675ec3fcc7c678ee205e205dc;p=automanga.git Allow libraries to specify reasons for not finding manga. --- diff --git a/automanga b/automanga index e4f3296..e581b74 100755 --- a/automanga +++ b/automanga @@ -81,8 +81,8 @@ def main(): sys.exit(1) try: mng = lib.byid(mid) - except KeyError: - sys.stderr.write("automanga: no such manga: %s\n" % mid) + except KeyError as e: + sys.stderr.write("automanga: no such manga: %s\n" % str(e)) sys.exit(1) profile.setalias(tgt, libname, mng.id) return @@ -114,8 +114,8 @@ def main(): sys.exit(1) try: mng = lib.byid(args[0]) - except KeyError: - sys.stderr.write("automanga: no such manga: %s\n" % args[0]) + except KeyError as e: + sys.stderr.write("automanga: no such manga: %s\n" % str(e)) sys.exit(1) else: libname = "local"