mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[systray] refactoring: replacing 'try/except' by 'with' block
This commit is contained in:
@@ -79,14 +79,11 @@ class UpdateCheck(QThread):
|
||||
self.logger = logger
|
||||
|
||||
def _notify_updates(self):
|
||||
self.lock.acquire()
|
||||
try:
|
||||
with self.lock:
|
||||
updates = list_updates(self.logger)
|
||||
|
||||
if updates is not None:
|
||||
self.signal.emit(updates)
|
||||
finally:
|
||||
self.lock.release()
|
||||
|
||||
self.sleep(self.check_interval)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user