pisi.conf varsa üzerine yazma

This commit is contained in:
İsmail Dönmez
2007-05-14 23:24:13 +00:00
parent 06d429c909
commit 55af03e922
+5 -1
View File
@@ -58,8 +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')]