diff options
Diffstat (limited to 'src/ogProcess.py')
-rw-r--r-- | src/ogProcess.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ogProcess.py b/src/ogProcess.py new file mode 100644 index 0000000..35abb89 --- /dev/null +++ b/src/ogProcess.py @@ -0,0 +1,20 @@ +import threading +import platform +import time + +print(platform.system()) + +if platform.system() == 'Linux': + from linux import ogOperations + +class ogProcess(): + def processOperation(self, op, URI): + if ("poweroff" in URI): + self.process_poweroff() + + def process_poweroff(self): + # Powering off thread + def pwoff(): + time.sleep(2) + ogOperations.poweroff() + threading.Thread(target=pwoff).start() |