From 881f8ddbf862aeaad94566581c9fe984b9d4db0e Mon Sep 17 00:00:00 2001 From: Joel Klimont Date: Wed, 6 Oct 2021 13:20:21 +0200 Subject: [PATCH] added error output to get_ip --- build_deb.sh | 2 +- compLib/Vision.py | 3 ++- compLib/VisionDaemon.py | 1 + compLib/__init__.py | 2 +- setup.py | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build_deb.sh b/build_deb.sh index 14ccbe9..7c4e00e 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -34,7 +34,7 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi -d "python3-pigpio" \ -d "python3-numpy" \ -d "ffmpeg" \ - -v 0.2.6-0 -t deb setup.py + -v 0.2.6-1 -t deb setup.py # --deb-changelog changelog \ # --deb-upstream-changelog changelog \ diff --git a/compLib/Vision.py b/compLib/Vision.py index a560cc9..c3221a2 100644 --- a/compLib/Vision.py +++ b/compLib/Vision.py @@ -165,8 +165,9 @@ def get_ip(): try: s.connect(('10.255.255.255', 1)) IP = s.getsockname()[0] - except Exception: + except Exception as e: IP = '127.0.0.1' + print(f"Error could not query ip: {e}") finally: s.close() return IP diff --git a/compLib/VisionDaemon.py b/compLib/VisionDaemon.py index 2af82ac..9114923 100644 --- a/compLib/VisionDaemon.py +++ b/compLib/VisionDaemon.py @@ -48,6 +48,7 @@ def get_ip(): IP = s.getsockname()[0] except Exception: IP = '127.0.0.1' + print(f"Error could not query ip: {e}") finally: s.close() return IP diff --git a/compLib/__init__.py b/compLib/__init__.py index 38904af..28b40b2 100644 --- a/compLib/__init__.py +++ b/compLib/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.2.6-0" +__version__ = "0.2.6-1" import importlib import compLib.LogstashLogging diff --git a/setup.py b/setup.py index 1ca6220..b5d4b9c 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ else: setuptools.setup( name="complib", - version="0.2.6-0", + version="0.2.6-1", author="F-WuTs", author_email="--", description="",