config'i biraz düzenle.

This commit is contained in:
Barış Metin
2005-07-18 17:52:47 +00:00
parent 08cb51a2a2
commit 8744c2ee11
4 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -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
+3 -2
View File
@@ -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)
+2 -4
View File
@@ -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
+1
View File
@@ -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