From dccb64666abf7523a90068bed2a11e57412c7d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 13 Feb 2024 18:44:20 +0100 Subject: [PATCH] make ip string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/exampleReceiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/exampleReceiver.py b/server/exampleReceiver.py index 5dfa0a3..24781fb 100644 --- a/server/exampleReceiver.py +++ b/server/exampleReceiver.py @@ -6,7 +6,7 @@ import os def get_eth0_ip(): try: # Get the IP address of the eth0 interface - eth0_ip = os.system("ip -4 -o addr show eth0 | awk '{print $4}' | cut -d '/' -f 1 ") + eth0_ip = str(os.system("ip -4 -o addr show eth0 | awk '{print $4}' | cut -d '/' -f 1 ")) return eth0_ip except (KeyError, IndexError, OSError) as e: print(f"Error getting eth0 IP: {e}")