AuthMethod is a must so return if it's missing
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Wed, 17 Nov 2010 21:49:50 +0000 (16:49 -0500)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Wed, 17 Nov 2010 21:49:50 +0000 (16:49 -0500)
aspects/ratelimitaspects.py

index 9a309f4..84af023 100644 (file)
@@ -40,7 +40,11 @@ class BaseRateLimit(object):
 
         api_method_name = wobj.name
         api_method_source = wobj.source
-        api_method = args[0]["AuthMethod"]
+
+        try:
+            api_method = args[0]["AuthMethod"]
+        except:
+            return
 
         if api_method == "session":
             api_method_caller = args[0]["session"]