Skip to content

Commit

Permalink
Only show notifications if running on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahsoka committed Jul 31, 2021
1 parent 90aef50 commit 63ef075
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions beskar/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .update import UpdateChecker
from . import __version__

import os
import logging

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -54,12 +55,13 @@ def __init__(self):
QtCore.QMetaObject.connectSlotsByName(self)

def show(self) -> None:
from .handle_errors import handle_exception
if os.name == 'nt':
from .handle_errors import handle_exception

self.update_thread = UpdateChecker()
self.update_thread.raise_exception.connect(lambda tup: handle_exception(*tup))
self.update_thread.close_all_windows.connect(QtWidgets.QApplication.closeAllWindows)
self.update_thread.start()
self.update_thread = UpdateChecker()
self.update_thread.raise_exception.connect(lambda tup: handle_exception(*tup))
self.update_thread.close_all_windows.connect(QtWidgets.QApplication.closeAllWindows)
self.update_thread.start()

system, num_of_devices = get_number_of_devices()
self.enter_volts_popup = EnterVoltsPopup(self)
Expand Down

0 comments on commit 63ef075

Please sign in to comment.