#3 bug fix list error

This commit is contained in:
Martin Weick 2021-01-18 20:34:13 +01:00
parent 9c6d7d2c6e
commit 6878c96f76

View File

@ -238,12 +238,15 @@ testscriptData=[]
def test_script(argv):
try:
testscriptData.append(False)
testscriptData.append(0)
opts, args=getopt.getopt(argv,"t")
except getopt.GetoptError:
print("Error by starting test script")
sys.exit(2)
for opt, arg in opts:
if opt == '-t':
testscriptData.clear()
testscriptData.append(True)
testCommands.append("deleteall")
#testCommands.append("fetchall")
@ -254,7 +257,7 @@ def test_script(argv):
testscriptData.append(len(testCommands))
else:
testscriptData.append(False)
testscriptData.append(0)
# main input loop
@ -269,8 +272,8 @@ while (command.lower() not in ["exit", "quit", "end"]):
i+=1
else:
command = input("Please enter command: ")
except:
print()
except Exception as ex:
print(ex)
print("Error while reading keyboard input")
break
command_split = command.split(" ")