Merge branch 'master' of git.dolda2000.com:/srv/git/r/automanga
[automanga.git] / automanga
index 98b3c9b..ff36282 100755 (executable)
--- a/automanga
+++ b/automanga
@@ -79,7 +79,11 @@ def main():
     if listtag is not None:
         if profile is not None:
             for mprof in profile.bytag(listtag):
-                mng = mprof.open()
+                try:
+                    mng = mprof.open()
+                except KeyError:
+                    sys.stderr.write("%s %s: no longer found\n" % (mprof.libnm, mprof.id))
+                    continue
                 sys.stdout.write("%s %s: \"%s\"\n" % (mprof.libnm, mprof.id, mng.name))
         return
 
@@ -106,7 +110,7 @@ def main():
         try:
             libname, mid = profile.getalias(alias)
         except KeyError:
-            sys.stderr("automanga: no such alias: %s\n" % alias)
+            sys.stderr.write("automanga: no such alias: %s\n" % alias)
             sys.exit(1)
         try:
             lib = manga.lib.findlib(libname)