示例#1
0
    def items(self, section, noreplace=False):
        items = StrictConfigParser.items(self, section)
        if noreplace:
            return items

        return [(key, replace_gnu_args(value, env=self._env))
                for key, value in items]
示例#2
0
文件: config.py 项目: decklord/circus
    def items(self, section, noreplace=False):
        items = StrictConfigParser.items(self, section)
        if noreplace:
            return items

        return [(key, replace_gnu_args(value, env=self._env))
                for key, value in items]
示例#3
0
文件: config.py 项目: decklord/circus
 def get(self, section, option):
     res = StrictConfigParser.get(self, section, option)
     return replace_gnu_args(res, env=self._env)
示例#4
0
文件: config.py 项目: decklord/circus
 def __init__(self, *args, **kw):
     StrictConfigParser.__init__(self, *args, **kw)
     self._env = dict(os.environ)
示例#5
0
 def get(self, section, option):
     res = StrictConfigParser.get(self, section, option)
     return replace_gnu_args(res, env=self._env)
示例#6
0
 def __init__(self, *args, **kw):
     StrictConfigParser.__init__(self, *args, **kw)
     self._env = dict(os.environ)
示例#7
0
 def test_strict_parser(self):
     cp = StrictConfigParser()
     bad_ini = os.path.join(os.path.dirname(__file__), 'bad.ini')
     self.assertRaises(ValueError, cp.read, bad_ini)