From 788a347b4316169ff1f7b74ffb9f01986fd8d34e Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 5 Jan 2010 18:19:37 +0000 Subject: merged documentation and address changes from rnr branch git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896159 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/address.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'python/qpid/address.py') diff --git a/python/qpid/address.py b/python/qpid/address.py index 6228ac757b..bda7157a5f 100644 --- a/python/qpid/address.py +++ b/python/qpid/address.py @@ -102,8 +102,8 @@ class AddressParser(Parser): result = {} while True: - if self.matches(ID): - n, v = self.nameval() + if self.matches(NUMBER, STRING, ID, LBRACE, LBRACK): + n, v = self.keyval() result[n] = v if self.matches(COMMA): self.eat(COMMA) @@ -114,16 +114,17 @@ class AddressParser(Parser): elif self.matches(RBRACE): break else: - raise ParseError(self.next(), ID, RBRACE) + raise ParseError(self.next(), NUMBER, STRING, ID, LBRACE, LBRACK, + RBRACE) self.eat(RBRACE) return result - def nameval(self): - name = self.eat(ID).value + def keyval(self): + key = self.value() self.eat(COLON) val = self.value() - return (name, val) + return (key, val) def value(self): if self.matches(NUMBER, STRING, ID): -- cgit v1.2.1