From eae73235b45ad19adeec2b10f7fa75be7ed9c527 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:39:21 -0500 Subject: [PATCH] input return int of stdout --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 67d4c314..b5e99fff 100644 --- a/transmit.py +++ b/transmit.py @@ -25,8 +25,8 @@ def input(pin): result = subprocess.run(query, capture_output=True, text=True, check=True) print(f"Command run was: {query}") print("Sucess!") - print(f"Output of the command (stdout): {result}") - return int(result) + print(f"Output of the command (stdout): {result.stdout}") + return int(result.stdout) except subprocess.CalledProcessError as e: print(f"Command failed with return code: {e.returncode}") print(f"Command run was: {e.cmd}")