summaryrefslogtreecommitdiff
path: root/python/qpid/address.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-01-05 18:19:37 +0000
committerRafael H. Schloming <rhs@apache.org>2010-01-05 18:19:37 +0000
commit788a347b4316169ff1f7b74ffb9f01986fd8d34e (patch)
treea90c444b530af4d3f5aa5ed331f081dcda36761f /python/qpid/address.py
parent15dd7bb94b09cc7abbffda2d92a3d93d82764171 (diff)
downloadqpid-python-788a347b4316169ff1f7b74ffb9f01986fd8d34e.tar.gz
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
Diffstat (limited to 'python/qpid/address.py')
-rw-r--r--python/qpid/address.py13
1 files changed, 7 insertions, 6 deletions
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):