From e32ff4233e69f0a1980b0bfd64a9e68936f119d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 13 Feb 2024 18:56:50 +0100 Subject: [PATCH] commented test debugger for ip again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/exampleReceiver.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/exampleReceiver.py b/server/exampleReceiver.py index 36c6450..72abb40 100644 --- a/server/exampleReceiver.py +++ b/server/exampleReceiver.py @@ -3,17 +3,17 @@ import sys import python_artnet as Artnet import os -# def get_eth0_ip(): -# try: -# # Get the IP address of the eth0 interface -# 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}") -# exit - def get_eth0_ip(): - return "10.0.0.150" + try: + # Get the IP address of the eth0 interface + 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}") + exit + +# def get_eth0_ip(): +# return "10.0.0.150" debug = True