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.
moonstone/vanilla_first_setup/utils/processor.py

24 lines
573 B
Python

import logging
import subprocess
logger = logging.getLogger("FirstSetup::Processor")
class Processor:
def __init__(self, config: 'Config'):
self.__config = config
def run(self):
logger.info(f"Spawning processor with config: {self.__config.get_str()}")
proc = subprocess.run(
2 years ago
["pkexec", "vanilla-first-setup-processor", self.__config.get_str()],
check=True
)
if proc.returncode != 0:
2 years ago
return False, "Error executing the Vanilla OS First Setup Processor"
return True