aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2019-07-13 19:12:47 +0200
committerMichael Buesch <m@bues.ch>2019-07-13 19:12:47 +0200
commitde7928b0344f118cb638a09de492f591c3be1d42 (patch)
tree0a3b87a1fd626830a29f03aa6f1c28818a37b465
parent949f33b6234f65187838721553518dc38b140e80 (diff)
downloadawlsim-de7928b0344f118cb638a09de492f591c3be1d42.tar.xz
awlsim-de7928b0344f118cb638a09de492f591c3be1d42.zip
gui: Fix sleep helper function, if user event processing is requested
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--awlsim/gui/awlsimclient.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/awlsim/gui/awlsimclient.py b/awlsim/gui/awlsimclient.py
index 255937ed..7a83344d 100644
--- a/awlsim/gui/awlsimclient.py
+++ b/awlsim/gui/awlsimclient.py
@@ -28,8 +28,9 @@ from awlsim.coreclient.sshtunnel import *
def sleepWithEventLoop(seconds, excludeInput=True):
end = monotonic_time() + seconds
- eventFlags = QEventLoop.AllEvents |\
- (QEventLoop.ExcludeUserInputEvents if excludeInput else 0)
+ eventFlags = QEventLoop.AllEvents
+ if excludeInput:
+ eventFlags |= QEventLoop.ExcludeUserInputEvents
while monotonic_time() < end:
QApplication.processEvents(eventFlags, 10)
QThread.msleep(10)
bues.ch cgit interface