summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2012-02-27 00:01:12 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2012-02-27 00:01:12 +0100
commitea5d24384e3b310c5fecbc29c4c7f815ba1500cf (patch)
tree09dedf2235497ff0e81856e8ad142669030d98be
parent89d0e9fc74e0dedccf4ddfb1939685f8b301a3e5 (diff)
Allow empty id when listing directories.
-rwxr-xr-xapp.py2
1 files changed, 1 insertions, 1 deletions
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: