1
0
Fork 0
mirror of synced 2024-06-29 03:31:06 +12:00

Do not crash, if pypresence not exists

This commit is contained in:
Dummerle 2021-12-26 23:57:56 +01:00
parent 4820719bef
commit 454671f9da
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1

View file

@ -36,7 +36,10 @@ class MainWindow(QMainWindow):
self.resize(width, height)
if not shared.args.offline:
self.rpc = DiscordRPC()
try:
self.rpc = DiscordRPC()
except ModuleNotFoundError:
logger.warning("Discord RPC module not found")
self.timer = QTimer()
self.timer.timeout.connect(self.timer_finished)