Commits

Victor Kotseruba  committed e9a5b3e

working rooms

  • Participants
  • Parent commits acf6838

Comments (0)

Files changed (1)

         self.data = ''
 
     def join_room(self):
-        if not rooms[self.room]:
+        if self.room not in rooms:
             rooms[self.room] = []
         rooms[self.room].append(self)
     
         if self.room:
             rooms[self.room].remove(self)
             if not rooms[self.room]:
-                del room[self.room]
+                del rooms[self.room]
     
     def handle_close(self):
         self.leave_room()