pisi.conf varsa yazma

This commit is contained in:
S.Çağlar Onur
2007-05-22 16:02:37 +00:00
parent f4c9915ac0
commit 1d3f7b2f52
+6 -1
View File
@@ -58,7 +58,12 @@ class Install(install):
destpath = os.path.join(self.root, "etc/pisi/") destpath = os.path.join(self.root, "etc/pisi/")
if not os.path.exists(destpath): if not os.path.exists(destpath):
os.makedirs(destpath) os.makedirs(destpath)
pisiconf = open(os.path.join(destpath, "pisi.conf"), "w")
confFile = os.path.join(destpath, "pisi.conf")
if os.path.isfile(confFile): # Don't overwrite existing pisi.conf
return
pisiconf = open(confFile, "w")
klasses = inspect.getmembers(pisi.configfile, inspect.isclass) klasses = inspect.getmembers(pisi.configfile, inspect.isclass)
defaults = [klass for klass in klasses if klass[0].endswith('Defaults')] defaults = [klass for klass in klasses if klass[0].endswith('Defaults')]