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
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)
if mprof is not None:
ntags = [tag for tag in args if tag[:1] != "-"]
rtags = [tag[1:] for tag in args if tag[:1] == "-"]
- print ntags, rtags
if ntags: mprof.tags.add(*ntags)
if rtags: mprof.tags.remove(*rtags)
return