diff --git a/pisi/actionsapi/actionglobals.py b/pisi/actionsapi/actionglobals.py index e088bc38..7cde60d9 100644 --- a/pisi/actionsapi/actionglobals.py +++ b/pisi/actionsapi/actionglobals.py @@ -49,10 +49,10 @@ class Dirs: class Flags: """General flags used in actions API""" - conf = pisi.config.config.conf - host = conf.build.host - cflags = conf.build.cflags - cxxflags = conf.build.cflags + values = pisi.config.config.values + host = values.build.host + cflags = values.build.cflags + cxxflags = values.build.cflags class ActionGlobals(pisi.config.Config): const = pisi.constants.const diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 31c102a4..075d7efe 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -48,8 +48,9 @@ class Command(object): username = self.options.username password = self.options.password if not username and not password: - if config.username and config.password: - self.authInfo = (config.username, config.password) + if config.values.username and config.values.password: + self.authInfo = (config.values.username, + config..values.password) return elif username and password: self.authInfo = (username, password) diff --git a/pisi/config.py b/pisi/config.py index 1a68c318..181b3e24 100644 --- a/pisi/config.py +++ b/pisi/config.py @@ -17,10 +17,8 @@ class Config(object): class configimpl: def __init__(self): - self.conf = ConfigurationFile("/etc/pisi/pisi.conf") - self.destdir = self.conf.general.destinationdirectory - self.username = self.conf.svn.username - self.password = self.conf.svn.password + self.values = ConfigurationFile("/etc/pisi/pisi.conf") + self.destdir = self.values.general.destinationdirectory # directory accessor functions # here is how it goes diff --git a/pisi/configfile.py b/pisi/configfile.py index 7cad2dae..625f54cf 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -68,6 +68,7 @@ class ConfigurationSection(object): class ConfigurationFile(object): + """Parse and get configuration values from the configuration file""" def __init__(self, filePath): parser = ConfigParser() self.filePath = filePath