Rev 5551: Cough, let's kill useless code. in file:///home/vila/src/bzr/experimental/config/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Dec 20 17:40:30 GMT 2010
At file:///home/vila/src/bzr/experimental/config/
------------------------------------------------------------
revno: 5551
revision-id: v.ladeuil+lp at free.fr-20101220174030-cwjaubwz2tegmp3i
parent: v.ladeuil+lp at free.fr-20101217115746-5412nn2yymoyoi6o
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: interpolate
timestamp: Mon 2010-12-20 18:40:30 +0100
message:
Cough, let's kill useless code.
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2010-12-17 11:57:46 +0000
+++ b/bzrlib/config.py 2010-12-20 17:40:30 +0000
@@ -128,25 +128,20 @@
STORE_BRANCH = 3
STORE_GLOBAL = 4
-_ConfigObj = None
-def ConfigObj(*args, **kwargs):
- global _ConfigObj
- if _ConfigObj is None:
- class ConfigObj(configobj.ConfigObj):
-
- def get_bool(self, section, key):
- return self[section].as_bool(key)
-
- def get_value(self, section, name):
- # Try [] for the old DEFAULT section.
- if section == "DEFAULT":
- try:
- return self[name]
- except KeyError:
- pass
- return self[section][name]
- _ConfigObj = ConfigObj
- return _ConfigObj(*args, **kwargs)
+
+class ConfigObj(configobj.ConfigObj):
+
+ def get_bool(self, section, key):
+ return self[section].as_bool(key)
+
+ def get_value(self, section, name):
+ # Try [] for the old DEFAULT section.
+ if section == "DEFAULT":
+ try:
+ return self[name]
+ except KeyError:
+ pass
+ return self[section][name]
class Config(object):
More information about the bazaar-commits
mailing list