Skip to content

Commit 4f897c1

Browse files
majestratejagerman
andcommitted
Update sogs/events.py
Co-authored-by: Jason Rhinelander <[email protected]>
1 parent c90bc40 commit 4f897c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sogs/events.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ def _handle_find_room(metric, query, encode=json.dumps):
5858
room = model.Room(token=query)
5959
else:
6060
raise Exception("invalid query metric: {}".format(metric))
61-
reply = dict()
61+
reply = {a: getattr(room, a) for a in model.Room.ALL_PROPS}
6262
reply['mods'] = room.get_mods()
6363
reply['active_users'] = room.active_users()
64-
for attr in model.Room.ALL_PROPS:
65-
reply[attr] = getattr(room, attr)
6664
return encode(reply)
6765

6866

0 commit comments

Comments
 (0)