diff --git a/src/pyff/api.py b/src/pyff/api.py index 10e7b3ad..4068b94f 100644 --- a/src/pyff/api.py +++ b/src/pyff/api.py @@ -462,7 +462,7 @@ def _response() -> Generator[bytes, bytes, None]: for e in entities: if in_loop: yield b',' - yield dumps(e) + yield dumps(e).encode('utf-8') in_loop = True yield b']' diff --git a/src/pyff/samlmd.py b/src/pyff/samlmd.py index b23f41b4..68700178 100644 --- a/src/pyff/samlmd.py +++ b/src/pyff/samlmd.py @@ -841,7 +841,7 @@ def entity_extended_display(entity, langs=None): if info == entity.get('entityID'): info = '' - return display.strip(), info.strip() + return (display or '').strip(), (info or '').strip() def entity_display_name(entity: Element, langs=None) -> str: