diff --git a/setstatus.py b/setstatus.py index 4f7d800..b250f88 100755 --- a/setstatus.py +++ b/setstatus.py @@ -1,11 +1,11 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# file: client-clear.py +# file: setstatus.py.py # date: 26.07.2019 # email: berhsi@web.de -# client, who connects to nr18.space at port 10001 to update the krautspace +# client, who connects to the statusserver at port 10001 to update the krautspace # door status. If no status is given as argument, he reads from stdin until # input is 0 or 1. @@ -51,7 +51,7 @@ def read_argument(): def main(*status): - HOST = 'localhost' + HOST = 'nr18.space' PORT = 10001 BOM = byteorder STATUS = None @@ -66,6 +66,8 @@ def main(*status): STATUS = read_argument() else: STATUS = check_arguments(argv) + if STATUS == None: + STATUS = read_argument() with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as mySocket: print('Socket created')