Commit e4ebe97f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos.package: config_dict is optional.

parent 5a6dc743
...@@ -54,17 +54,18 @@ class ExecError(SlapError): ...@@ -54,17 +54,18 @@ class ExecError(SlapError):
# Class containing all parameters needed for configuration # Class containing all parameters needed for configuration
class Config: class Config:
def __init__(self, option_dict): def __init__(self, option_dict=None):
# Set options parameters if option_dict is not None:
for option, value in option_dict.__dict__.items(): # Set options parameters
setattr(self, option, value) for option, value in option_dict.__dict__.items():
setattr(self, option, value)
class BasePromise(PackageManager): class BasePromise(PackageManager):
systemctl_path_list = ["/bin/systemctl", systemctl_path_list = ["/bin/systemctl",
"/usr/bin/systemctl"] "/usr/bin/systemctl"]
def __init__(self, config_dict): def __init__(self, config_dict=None):
self.config = Config(config_dict) self.config = Config(config_dict)
self.logger = logging.getLogger('') self.logger = logging.getLogger('')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment