Skip to content

Commit

Permalink
fix debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
briangu committed Dec 3, 2023
1 parent 6848402 commit b79e9c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/kgpy
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,14 @@ if __name__ == "__main__":
parser.add_argument('-s', '--server', help='start the IPC server', type=str)
parser.add_argument('-t', '--test', help='test program from file')
parser.add_argument('-v', '--verbose', help='enable verbose output', action="store_true")
parser.add_argument('-d', '--debug', help='enable debug mode', action="store_false")
parser.add_argument('-d', '--debug', help='enable debug mode', action="store_true")
parser.add_argument('filename', nargs='?', help='filename to be run if no flags are specified')

args = parser.parse_args(main_args[1:])

if args.debug:
print("args: ", args)

if args.expr:
print(KlongInterpreter()(args.expr))
exit()
Expand Down Expand Up @@ -357,6 +360,9 @@ if __name__ == "__main__":
else:
run_repl = True

if args.debug:
print("run_repl: ", run_repl)

if run_repl:
console_loop = asyncio.new_event_loop()
asyncio.set_event_loop(console_loop)
Expand Down

0 comments on commit b79e9c4

Please sign in to comment.