From 4ba42558b108748d395f27b34258fb537f15d7cb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 3 Nov 2013 10:12:50 -0500 Subject: [PATCH] Add the attributes interface to messages for input checking --- confluent/httpapi.py | 2 ++ confluent/messages.py | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/confluent/httpapi.py b/confluent/httpapi.py index 2fa3d72d..f6041e60 100644 --- a/confluent/httpapi.py +++ b/confluent/httpapi.py @@ -14,6 +14,7 @@ import eventlet import json import os import string +import traceback import time import urlparse import eventlet.wsgi @@ -228,6 +229,7 @@ def resourcehandler(env, start_response): yield "404 - Request path not recognized" return except exc.InvalidArgumentException: + traceback.print_exc() start_response('400 Bad Request', headers) yield '400 - Bad Request' return diff --git a/confluent/messages.py b/confluent/messages.py index 0611502d..ea9e2aac 100644 --- a/confluent/messages.py +++ b/confluent/messages.py @@ -36,39 +36,63 @@ class ConfluentMessage(object): snippet += '