From fb4b813d4df62b7b2445bdced961eb1847267eed Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 31 Oct 2019 05:32:31 +0100 Subject: [PATCH] osmo_interact_vty.py: fix py3 encoding bug That code in common.py is hit when invoking via osmo_interact_vty.py. It has a unicode string already, its attempt to decode hits a python exception (no 'decode' method). Must be a long standing bug that no-one saw because we're only ever using the osmo_verify_transcript_vty.py variant. Change-Id: I1b4a629f12863c498a8681b555f57b4e255cebfb --- osmopy/osmo_interact/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py index 39163a2..cc7e190 100644 --- a/osmopy/osmo_interact/common.py +++ b/osmopy/osmo_interact/common.py @@ -429,7 +429,7 @@ def main_run_commands(run_app_str, output_path, cmd_str, cmd_files, interact): for f_path in (cmd_files or []): with open(f_path, 'r') as f: - interact.feed_commands(output, f.read().decode('utf-8').splitlines()) + interact.feed_commands(output, f.read().splitlines()) if not (cmd_str or cmd_files): while True: