From ea5d24384e3b310c5fecbc29c4c7f815ba1500cf Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 27 Feb 2012 00:01:12 +0100 Subject: Allow empty id when listing directories. --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 6b4452a..e947f80 100755 --- a/app.py +++ b/app.py @@ -5,7 +5,7 @@ from config import config class JSONApplication(object): def list(self, environ, start_response, path): - root_id = int(path[1]) if len(path[1]) else 0 + root_id = int(path[1]) if len(path) > 1 and len(path[1]) else 0 session = db.Session() try: if root_id > 0: -- cgit v1.2.3