changeset 23:6c84924cb63a

Made cid an int.
author Atul Varma <varmaa@toolness.com>
date Thu, 12 Feb 2009 19:25:23 -0800
parents ed0ab546f189
children b094768c285b
files server.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/server.py	Thu Feb 12 19:21:53 2009 -0800
+++ b/server.py	Thu Feb 12 19:25:23 2009 -0800
@@ -20,7 +20,7 @@
         else:
             match = CID_PATH.match(path)
             if match:
-                cid = match.group(1)
+                cid = int(match.group(1))
                 if cid in changesets:
                     return atulweb.Response(changesets[cid],
                                             'application/json')
@@ -31,7 +31,7 @@
     elif environ['REQUEST_METHOD'] == 'PUT':
         match = CID_PATH.match(environ['PATH_INFO'])
         if match:
-            cid = match.group(1)
+            cid = int(match.group(1))
             if cid == status['max_changeset'] + 1:
                 status['max_changeset'] = cid
                 req = atulweb.Request(environ)