added error output to get_ip
This commit is contained in:
parent
436ef35d46
commit
881f8ddbf8
5 changed files with 6 additions and 4 deletions
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
__version__ = "0.2.6-0"
|
||||
__version__ = "0.2.6-1"
|
||||
|
||||
import importlib
|
||||
import compLib.LogstashLogging
|
||||
|
|
2
setup.py
2
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="",
|
||||
|
|
Reference in a new issue