[PhotoFloat] [PATCH 1/2] sane default for cache path
anarcat at orangeseeds.org
anarcat at orangeseeds.org
Mon Jun 24 03:45:34 CEST 2013
From: Antoine Beaupré <anarcat at koumbit.org>
---
scanner/main.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scanner/main.py b/scanner/main.py
index c1fbf8c..9ae8f6a 100755
--- a/scanner/main.py
+++ b/scanner/main.py
@@ -8,9 +8,11 @@ def main():
reload(sys)
sys.setdefaultencoding("UTF-8")
- if len(sys.argv) != 3:
- print "usage: %s ALBUM_PATH CACHE_PATH" % sys.argv[0]
+ if len(sys.argv) < 2:
+ print "usage: %s ALBUM_PATH [ CACHE_PATH ]" % sys.argv[0]
return
+ if len(sys.argv) < 3:
+ sys.argv.append('%s/../cache' % sys.argv[1])
try:
TreeWalker(sys.argv[1], sys.argv[2])
except KeyboardInterrupt:
--
1.7.10.4
More information about the PhotoFloat
mailing list