From: Christian Heller Date: Mon, 23 Feb 2015 11:08:52 +0000 (+0100) Subject: Server/py: Fix variable naming bug. X-Git-Tag: tce~486 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/cards/%7B%7Bcard_id%7D%7D/test.html?a=commitdiff_plain;h=6caae6abd4ff38c19d0f780f445fd08370e8e56b;p=plomrogue Server/py: Fix variable naming bug. --- diff --git a/plomrogue-server.py b/plomrogue-server.py index 064f872..8f44015 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -82,10 +82,10 @@ def obey(command, prefix, replay=False, do_record=False): except ValueError as err: print("Can't tokenize command string: " + str(err) + ".") return - if len(tokens) > 0 and tokens[0] in commands \ - and len(tokens) >= commands[tokens[0]][0] + 1: - if commands[tokens[0]][1]: - commands[tokens[0]][2]() + if len(tokens) > 0 and tokens[0] in commands_db \ + and len(tokens) >= commands_db[tokens[0]][0] + 1: + if commands_db[tokens[0]][1]: + commands_db[tokens[0]][2]() elif replay: print("Due to replay mode, reading command as 'go on in record'.") line = io_db["file_record"].readline() @@ -96,7 +96,7 @@ def obey(command, prefix, replay=False, do_record=False): else: print("Reached end of record file.") else: - commands[tokens[0]][2]() + commands_db[tokens[0]][2]() if do_record: record(command) else: