Dolda2000 GitWeb
/
automanga.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fab0538
)
Exit in a well-defined manner upon occurrence of said error.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 12 May 2013 02:46:30 +0000
(
04:46
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 12 May 2013 02:46:30 +0000
(
04:46
+0200)
automanga
patch
|
blob
|
blame
|
history
diff --git
a/automanga
b/automanga
index
0381786
..
36bd1cf
100755
(executable)
--- a/
automanga
+++ b/
automanga
@@
-65,10
+65,15
@@
if libname is not None:
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: