home · contact · privacy
New client: Reorganize code.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 7 Nov 2015 20:47:22 +0000 (21:47 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 7 Nov 2015 20:47:22 +0000 (21:47 +0100)
client_prototype.py

index 815ae7eaed3d7bc10fde1530b197edf232d9825d..c828f7dee0ab584124630f52ca71fe56a17b2d20 100644 (file)
@@ -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)