changeset 7:a8c60480fce0

make query_string argument more universal
author k0s <k0scist@gmail.com>
date Sun, 27 Dec 2009 18:45:28 -0500
parents d2990750e5d6
children 3be4b669983c
files setup.py uploader/handlers.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Sun Dec 27 16:35:48 2009 -0500
+++ b/setup.py	Sun Dec 27 18:45:28 2009 -0500
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 import sys, os
 
-version = "0.2.2"
+version = "0.2.3"
 
 setup(name='uploader',
       version=version,
--- a/uploader/handlers.py	Sun Dec 27 16:35:48 2009 -0500
+++ b/uploader/handlers.py	Sun Dec 27 18:45:28 2009 -0500
@@ -29,6 +29,8 @@
 
     @classmethod
     def match(cls, app, request):
+        if app.query_string and (app.query_string not in request.GET):
+            return False
         return request.method == 'GET'
 
     def __call__(self):
@@ -62,9 +64,7 @@
     
     @classmethod
     def match(cls, app, request):
-        if request.method != 'GET':
-            return False
-        if app.query_string and (app.query_string not in request.GET):
+        if not Get.match(cls, app, request):
             return False
         _path = path(app.directory, request)
         if os.path.exists(_path) and os.path.isdir(_path):