Fix repl
This commit is contained in:
parent
3c62acc975
commit
aa987a5b4b
|
@ -16,11 +16,11 @@ def repl(args):
|
||||||
if name.startswith("command_")}
|
if name.startswith("command_")}
|
||||||
commands['help'] = "Print this message"
|
commands['help'] = "Print this message"
|
||||||
commands['exit'] = "Exit"
|
commands['exit'] = "Exit"
|
||||||
print("Amanuensis running on Lexicon {}".format(args.lexicon))
|
print("Amanuensis running on Lexicon {}".format(args.tl_lexicon))
|
||||||
while True:
|
while True:
|
||||||
# Read input in a loop.
|
# Read input in a loop.
|
||||||
try:
|
try:
|
||||||
data = input("{}> ".format(args.lexicon))
|
data = input("{}> ".format(args.tl_lexicon))
|
||||||
except EOFError:
|
except EOFError:
|
||||||
print()
|
print()
|
||||||
break
|
break
|
||||||
|
@ -84,7 +84,7 @@ def get_parser(valid_commands):
|
||||||
metavar="USERNAME",
|
metavar="USERNAME",
|
||||||
dest="tl_username",
|
dest="tl_username",
|
||||||
help="Specify a user to operate on")
|
help="Specify a user to operate on")
|
||||||
parser.set_defaults(func=lambda args: repl(args) if args.lexicon else parser.print_help())
|
parser.set_defaults(func=lambda args: repl(args) if args.tl_lexicon else parser.print_help())
|
||||||
subp = parser.add_subparsers(
|
subp = parser.add_subparsers(
|
||||||
metavar="COMMAND",
|
metavar="COMMAND",
|
||||||
dest="command",
|
dest="command",
|
||||||
|
|
Loading…
Reference in New Issue