Dolda2000 GitWeb
/
automanga.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't crash on tag listing when a manga has ceased to exist.
[automanga.git]
/
automanga
diff --git
a/automanga
b/automanga
index
8fad817
..
a3e7af4
100755
(executable)
--- a/
automanga
+++ b/
automanga
@@
-79,8
+79,11
@@
def main():
if listtag is not None:
if profile is not None:
for mprof in profile.bytag(listtag):
if listtag is not None:
if profile is not None:
for mprof in profile.bytag(listtag):
- mng = mprof.open()
- sys.stdout.write("%s %s: \"%s\"\n" % (mprof.libnm, mprof.id, mng.name))
+ 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))
return
if alias and (alias.find('=') > 0):
return
if alias and (alias.find('=') > 0):
@@
-152,7
+155,6
@@
def main():
if mprof is not None:
ntags = [tag for tag in args if tag[:1] != "-"]
rtags = [tag[1:] for tag in args if tag[:1] == "-"]
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
if ntags: mprof.tags.add(*ntags)
if rtags: mprof.tags.remove(*rtags)
return