Skip to content

Commit

Permalink
sleep in status_changed() to prevent race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
troubadoour committed Aug 13, 2015
1 parent d8d3a8e commit e0bb470
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions usr/lib/python2.7/dist-packages/sdwdate_gui/sdwdate_gui.py
Expand Up @@ -6,6 +6,7 @@
from subprocess import check_output, call
import pickle
import os
import time


class SdwdateTrayMenu(QtGui.QMenu):
Expand Down Expand Up @@ -65,6 +66,7 @@ def check_bootclockrandomization(self):
print message

def status_changed(self):
time.sleep(0.01)
with open(self.status_path, 'rb') as f:
status = pickle.load(f)
self.setIcon(QtGui.QIcon(status['icon']))
Expand Down

0 comments on commit e0bb470

Please sign in to comment.