Commit f3805885 authored by Michael Graff's avatar Michael Graff
Browse files

more review comments

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent 0102a47f
......@@ -39,13 +39,13 @@ class SubscriptionManager:
"""Remove the socket from the one specific subscription."""
target = ( group, instance )
if target in self.subscriptions:
while socket in self.subscriptions[target]:
if socket in self.subscriptions[target]:
def unsubscribe_all(self, socket):
"""Remove the socket from all subscriptions."""
for socklist in self.subscriptions.values():
while socket in socklist:
if socket in socklist:
def find_sub(self, group, instance):
......@@ -62,7 +62,7 @@ def _encode_length_and_type(data, datatype):
elif length < 0x00010000:
return(struct.pack(">B H", datatype | _ITEM_LENGTH_16, length) + data)
return(struct.pack(">B I", datatype, length) + data)
return(struct.pack(">B I", datatype | _ITEM_LENGTH_32, length) + data)
def _pack_utf8(item):
"""Pack a string (utf-8) and its type/length prefix."""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment