Merge branch 'master' of git.dolda2000.com:/srv/git/r/automanga
[automanga.git] / automanga
index a3e7af4..ff36282 100755 (executable)
--- a/automanga
+++ b/automanga
@@ -81,9 +81,10 @@ def main():
             for mprof in profile.bytag(listtag):
                 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))
+                    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
 
     if alias and (alias.find('=') > 0):
@@ -109,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)