This repository was archived by the owner on Aug 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 44import shutil
55import time
66from PyQt6 .QtCore import QThread , pyqtSignal
7- from components .statusInfo import checkSpotifyRunning
7+ from components .statusInfo import checkSpotifyRunning , checkAdminPrivileges
88
99# Installer task for both windows and linux/mac with progress and error handling
1010
Original file line number Diff line number Diff line change @@ -179,3 +179,12 @@ def checkInternetConnection():
179179 return False
180180 except :
181181 return False
182+
183+ def checkAdminPrivileges ():
184+ try :
185+ if os .getuid () == 0 :
186+ return True
187+ else :
188+ return False
189+ except :
190+ return False
Original file line number Diff line number Diff line change @@ -96,6 +96,10 @@ def __init__(self):
9696 # Execute once window is loaded before listeners are enabled
9797
9898 def InitWindow (self ):
99+ if checkAdminPrivileges ():
100+ #close app with error mesage
101+ errorDialog ("NEVER run sussy programms like this with admin privileges !!" )
102+ sys .exit (0 )
99103 movie = QMovie (os .path .join (
100104 os .path .dirname (__file__ ), "res" , "retroflicker.gif" ))
101105 self .background_graphics .setMovie (movie )
You can’t perform that action at this time.
0 commit comments