summaryrefslogtreecommitdiff
path: root/src/config.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-26 17:10:37 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-26 17:10:37 +0000
commit865ab0316a53a32c9caac842bbd54d233cdd2665 (patch)
tree7901dd80922ed8717eec4178cab97fba3b3daf74 /src/config.py
parentb0b4dd1f0840def1352e34da8528af5e53696112 (diff)
downloadpoezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.gz
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.bz2
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.xz
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.zip
nettoyage
Diffstat (limited to 'src/config.py')
-rw-r--r--src/config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/config.py b/src/config.py
index ed50f622..238d2d5e 100644
--- a/src/config.py
+++ b/src/config.py
@@ -33,6 +33,10 @@ class Config(RawConfigParser):
def get(self, option):
return RawConfigParser.get(self, self.defsection, option)
+ def rget(self, option):
+ res = self.get(option)
+ print res
+
def getint(self, option):
return int(self.get(option))
@@ -46,8 +50,9 @@ class Config(RawConfigParser):
RawConfigParser.set(self, self.defsection, option, value)
def save(self):
- with copen(self.filename, "w", "utf-8", "ignore") as f:
- RawConfigParser.write(self, f)
+ f = copen(self.filename, "w", "utf-8", "ignore")
+ RawConfigParser.write(self, f)
+ f.close()
def setAndSave(self, option, value):
self.set(option, value)