From 41a034f69fbfa93ec5b16ae0aef22a346c78359e Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 23 Jul 2013 22:19:39 +0200 Subject: [PATCH] Fixed a few bugs. --- automanga | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automanga b/automanga index d6eddeb..e4f3296 100755 --- a/automanga +++ b/automanga @@ -43,6 +43,8 @@ elif profile is not None: profile = manga.profile.profile.byname(profile) def main(): + global libname + if search: if len(args) < 2: usage(sys.stderr) @@ -67,7 +69,7 @@ def main(): return if alias and (alias.find('=') > 0): - alias, nm = alias.split('=', 1) + tgt, nm = alias.split('=', 1) if not ':' in nm: usage(sys.stderr) sys.exit(1) @@ -82,7 +84,7 @@ def main(): except KeyError: sys.stderr.write("automanga: no such manga: %s\n" % mid) sys.exit(1) - profile.setalias(alias, libname, mng.id) + profile.setalias(tgt, libname, mng.id) return if alias: -- 2.11.0