diff --git a/library/panos_admpwd.py b/library/panos_admpwd.py index cd3046bf..2c1e282d 100755 --- a/library/panos_admpwd.py +++ b/library/panos_admpwd.py @@ -88,18 +88,19 @@ def wait_with_timeout(module, shell, prompt, timeout=60): now = time.time() - result = "" + result = b"" while True: if shell.recv_ready(): result += shell.recv(_PROMPTBUFF) - endresult = result.strip() + resultstr = result.decode("utf-8") + endresult = resultstr.strip() if len(endresult) != 0 and endresult[-1] == prompt: break if time.time() - now > timeout: module.fail_json(msg="Timeout waiting for prompt") - return result + return resultstr def set_panwfw_password(module, ip_address, key_filename, newpassword, username):