From 5989659bee4c660d0b99282075c31b12bf22f8ba Mon Sep 17 00:00:00 2001 From: James Meyer Date: Thu, 31 Jan 2013 20:00:22 -0600 Subject: LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first. --- abs/core/LinHES-system/msg_daemon.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/abs/core/LinHES-system/msg_daemon.py b/abs/core/LinHES-system/msg_daemon.py index 8601075..cd0465b 100755 --- a/abs/core/LinHES-system/msg_daemon.py +++ b/abs/core/LinHES-system/msg_daemon.py @@ -272,16 +272,18 @@ class msg_queue_runner(threading.Thread): def run(self): while True: + display_time = None try: msgdict = self.msg_queue.get_msg() style = self.get_current_style() if msgdict['timeout'] == None: display_time = 3 - + else: + display_time = msgdict['timeout'] # display message here msgtext = msgdict['msg'] if style == "enhanced": - display_time = display_time * 1000 + display_time = int(display_time) * 1000 self.p = multiprocessing.Process(target=self.out_msg.display, args=(msgtext,display_time)) self.p.start() self.p.join() -- cgit v0.12