Dolda2000 GitWeb
/
automanga.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Exit in a well-defined manner upon occurrence of said error.
[automanga.git]
/
automanga
diff --git
a/automanga
b/automanga
index
e6435cc
..
36bd1cf
100755
(executable)
--- a/
automanga
+++ b/
automanga
@@
-65,14
+65,20
@@
if libname is not None:
sys.exit(1)
else:
libname = "local"
sys.exit(1)
else:
libname = "local"
- if len(args) > 0:
- mng = manga.local.manga(args[0])
- else:
- mng = manga.local.manga(".")
+ try:
+ if len(args) > 0:
+ mdir = args[0]
+ else:
+ mdir = "."
+ mng = manga.local.manga(mdir)
+ except TypeError:
+ sys.stderr.write("automanga: not a valid manga directory: %s\n" % mdir)
+ sys.exit(1)
+mprof = None if profile is None else profile.getmanga(libname, mng.id, True)
if profile is not None:
profile.setlast()
if profile is not None:
profile.setlast()
-reader = manga.reader.reader(mng,
profile.getmanga(libname, mng.id, True)
)
+reader = manga.reader.reader(mng,
mprof
)
reader.show()
gtk.main()
reader.show()
gtk.main()