Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Fix associate script for P3
Browse files Browse the repository at this point in the history
  • Loading branch information
ziima committed Jan 8, 2019
1 parent 50caa1b commit c91131e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def strxor(x, y):
def parse_kv_response(response):
"""Parse the key-value response."""
decoded_data = {}
for line in response.iter_lines():
for line in response.text.splitlines():
line = line.strip()
if not line:
continue
Expand Down Expand Up @@ -175,7 +175,7 @@ def establish_association(endpoint, assoc_type, session_type, generator, generat
'session_type': association_data['session_type'],
'assoc_handle': association_data['assoc_handle'],
'expires_in': association_data['expires_in'],
'mac_key': base64.b64encode(mac_key)}
'mac_key': base64.b64encode(mac_key).decode('utf-8')}


def main():
Expand Down

0 comments on commit c91131e

Please sign in to comment.