Skip to content

Commit

Permalink
Ensure peers is consistently ordered on old pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k committed Sep 3, 2019
1 parent ce3db3f commit 54e1ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homekit/accessoryserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def _post_pairings(self):

# 3) construct response TLV
tmp = [(TLV.kTLVType_State, TLV.M2)]
for index, pairing_id in enumerate(server_data.peers):
for index, pairing_id in enumerate(sorted(server_data.peers)):
tmp.append((TLV.kTLVType_Identifier, pairing_id.encode()))
tmp.append((TLV.kTLVType_PublicKey, server_data.get_peer_key(pairing_id.encode())))
user = TLV.kTLVType_Permission_RegularUser
Expand Down

0 comments on commit 54e1ca4

Please sign in to comment.