|
@ -83,9 +83,12 @@ class BaseManager(object): |
|
|
def get_rooms(self, sid, namespace): |
|
|
def get_rooms(self, sid, namespace): |
|
|
"""Return the rooms a client is in.""" |
|
|
"""Return the rooms a client is in.""" |
|
|
r = [] |
|
|
r = [] |
|
|
for room_name, room in six.iteritems(self.rooms[namespace]): |
|
|
try: |
|
|
if room_name is not None and sid in room and room[sid]: |
|
|
for room_name, room in six.iteritems(self.rooms[namespace]): |
|
|
r.append(room_name) |
|
|
if room_name is not None and sid in room and room[sid]: |
|
|
|
|
|
r.append(room_name) |
|
|
|
|
|
except KeyError: |
|
|
|
|
|
pass |
|
|
return r |
|
|
return r |
|
|
|
|
|
|
|
|
def emit(self, event, data, namespace, room=None, skip_sid=None, |
|
|
def emit(self, event, data, namespace, room=None, skip_sid=None, |
|
|