setstatus.py: its possible now to pass a integer to main()
to perform a stresstest its possible now to pass an integer as argument to main()
This commit is contained in:
parent
868702eb8d
commit
777c320ce4
1 changed files with 10 additions and 5 deletions
|
@ -49,15 +49,20 @@ def read_argument():
|
|||
return status
|
||||
|
||||
|
||||
def main():
|
||||
def main(*status):
|
||||
|
||||
HOST = 'nr18.space'
|
||||
HOST = 'localhost'
|
||||
PORT = 10001
|
||||
BOM = byteorder
|
||||
STATUS = None
|
||||
RESPONSE = None
|
||||
|
||||
if check_arguments(argv) == None:
|
||||
if status:
|
||||
STATUS = status[0]
|
||||
STATUS = bytes([STATUS])
|
||||
print('Status: {}'.format(STATUS))
|
||||
else:
|
||||
if len(argv) == 1:
|
||||
STATUS = read_argument()
|
||||
else:
|
||||
STATUS = check_arguments(argv)
|
Loading…
Reference in a new issue