X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=client_prototype.py;h=c828f7dee0ab584124630f52ca71fe56a17b2d20;hb=56eea48c45b4702bc32a6615b676f7e8966089f4;hp=815ae7eaed3d7bc10fde1530b197edf232d9825d;hpb=f90a635ac962646e62a829fe6dff437ad20ec8f9;p=plomrogue diff --git a/client_prototype.py b/client_prototype.py index 815ae7e..c828f7d 100644 --- a/client_prototype.py +++ b/client_prototype.py @@ -214,10 +214,9 @@ def cursed_main(stdscr): draw_screen() cursed_main.redraw = False char = stdscr.getch() - if (char >= 0): - if chr(char) in commands: - commands[chr(char)]() - cursed_main.redraw = True + if char >= 0 and chr(char) in commands: + commands[chr(char)]() + cursed_main.redraw = True new_data_from_server = io["file_in"].read() ping_test(len(new_data_from_server) > 0) read_into_message_queue(new_data_from_server)