Merge pull request #25 from VoIPCS/chanvars
Make that channel variables will be stored in a dictionarymaster
commit
1eecd02370
|
@ -108,6 +108,14 @@ class ManagerMsg(object):
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
k, v = (x.strip() for x in line.split(':', 1))
|
k, v = (x.strip() for x in line.split(':', 1))
|
||||||
|
# if header is ChanVariable it can have more that one value
|
||||||
|
# we store the variable in a dictionary parsed
|
||||||
|
if 'ChanVariable' in k:
|
||||||
|
if not self.headers.has_key('ChanVariable'):
|
||||||
|
self.headers['ChanVariable']={}
|
||||||
|
name, value = (x.strip() for x in v.split('=',1))
|
||||||
|
self.headers['ChanVariable'][name]=value
|
||||||
|
else:
|
||||||
self.headers[k] = v
|
self.headers[k] = v
|
||||||
except ValueError:
|
except ValueError:
|
||||||
# invalid header, start of multi-line data response
|
# invalid header, start of multi-line data response
|
||||||
|
|
Loading…
Reference in New Issue