summaryrefslogtreecommitdiffstats
path: root/src/ogProcess.py
blob: 35abb892f9564a075caba725acc4c539454bdcc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()