commit 8a0c9f58046670c7a808e2e4a79b82244405e847 Author: Sean Robinson seankrobinson@gmail.com Date: Fri Dec 14 14:05:13 2012 -0700
FIX: include positional argument name which is missing proper quoting
This was discovered with a spot coverage test. These were the only lines not run in the Event class while I was adding tests for the stem.response.events module. I just *had* to write a test for these two lines and it turned out they had a problem.
Signed-off-by: Sean Robinson seankrobinson@gmail.com --- stem/response/events.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/response/events.py b/stem/response/events.py index 4e0aef8..889f93b 100644 --- a/stem/response/events.py +++ b/stem/response/events.py @@ -96,11 +96,11 @@ class Event(stem.response.ControlMessage): attr_values = [positional.pop(0)]
if not attr_values[0].startswith('"'): - raise stem.ProtocolError("The %s value should be quoted, but didn't have a starting quote: %s" % self) + raise stem.ProtocolError("The %s value should be quoted, but didn't have a starting quote: %s" % (attr_name, self))
while True: if not positional: - raise stem.ProtocolError("The %s value should be quoted, but didn't have an ending quote: %s" % self) + raise stem.ProtocolError("The %s value should be quoted, but didn't have an ending quote: %s" % (attr_name, self))
attr_values.append(positional.pop(0)) if attr_values[-1].endswith('"'): break