You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
402 B
Python
18 lines
402 B
Python
2 years ago
|
import subprocess
|
||
|
|
||
|
|
||
|
class Processor:
|
||
|
|
||
|
def __init__(self, config: 'Config'):
|
||
|
self.__config = config
|
||
|
|
||
|
def run(self):
|
||
|
proc = subprocess.run(
|
||
2 years ago
|
["pkexec", "sugar-cubes-processor", self.__config.get_str()],
|
||
2 years ago
|
check=True
|
||
|
)
|
||
|
|
||
|
if proc.returncode != 0:
|
||
2 years ago
|
return False, "Error executing the Sugar Cubes Processor"
|
||
2 years ago
|
|
||
|
return True
|