コード例 #1
0
        def _interpolate(self, section, option, rawval, vars):
            value = ConfigParser._interpolate(self, section, option, eawval, vars)

            return EnvironmentInterpolation().before_get(
                parser=self, section=section, option=option, value=value, 
                defaults=None
            )
コード例 #2
0
ファイル: loadwsgi.py プロジェクト: G-Node/website-theme
 def _interpolate(self, section, option, rawval, vars):
     try:
         return ConfigParser._interpolate(
             self, section, option, rawval, vars)
     except Exception, e:
         args = list(e.args)
         args[0] = 'Error in file %s, [%s] %s=%r: %s' % (
             self.filename, section, option, rawval, e)
         e.args = tuple(args)
         raise
コード例 #3
0
 def _interpolate(self, section, option, rawval, vars):
     try:
         return ConfigParser._interpolate(self, section, option, rawval,
                                          vars)
     except Exception, e:
         args = list(e.args)
         args[0] = 'Error in file %s, [%s] %s=%r: %s' % (
             self.filename, section, option, rawval, e)
         e.args = tuple(args)
         raise
コード例 #4
0
ファイル: config.py プロジェクト: neoclust/mmc
 def _interpolate(self, section, option, value, d):
     try:
         value = ConfigParser._interpolate(self, section, option, value, d)
     except InterpolationError:
         if '%(baseDN)s' in value:
             from mmc.plugins.base import BasePluginConfig
             config = PluginConfigFactory.new(BasePluginConfig, "base")
             value = value.replace('%(baseDN)s', config.baseDN)
         else:
             raise InterpolationError
     return value
コード例 #5
0
ファイル: config.py プロジェクト: allgi/mmc
 def _interpolate(self, section, option, value, d):
     try:
         value = ConfigParser._interpolate(self, section, option, value, d)
     except InterpolationError:
         if '%(baseDN)s' in value:
             from mmc.plugins.base import BasePluginConfig
             config = PluginConfigFactory.new(BasePluginConfig, "base")
             value = value.replace('%(baseDN)s', config.baseDN)
         else:
             raise InterpolationError
     return value
コード例 #6
0
 def _interpolate(self, section, option, rawval, vars):
     # Python < 3.2
     try:
         return ConfigParser._interpolate(self, section, option, rawval,
                                          vars)
     except Exception:
         e = sys.exc_info()[1]
         args = list(e.args)
         args[0] = 'Error in file %s: %s' % (self.filename, e)
         e.args = tuple(args)
         e.message = args[0]
         raise
コード例 #7
0
ファイル: loadwsgi.py プロジェクト: cidvbi/PathogenPortal
 def _interpolate(self, section, option, rawval, vars):
     # Python < 3.2
     try:
         return ConfigParser._interpolate(
             self, section, option, rawval, vars)
     except Exception:
         e = sys.exc_info()[1]
         args = list(e.args)
         args[0] = 'Error in file %s: %s' % (self.filename, e)
         e.args = tuple(args)
         e.message = args[0]
         raise
コード例 #8
0
ファイル: cfg_parser.py プロジェクト: spotify/luigi
 def _interpolate(self, section, option, rawval, vars):
     value = ConfigParser._interpolate(self, section, option, rawval, vars)
     return EnvironmentInterpolation().before_get(
         parser=self, section=section, option=option,
         value=value, defaults=None,
     )
コード例 #9
0
 def _interpolate(self, section, option, rawval, variables):
     if isinstance(rawval, basestring):
         oldConfigParser._interpolate(self, section, option, rawval, variables)
     return rawval
コード例 #10
0
ファイル: toolbox.py プロジェクト: AlexUlrich/digsby
 def _interpolate(self, section, option, rawval, vars):
     try:
         value = ConfigParser._interpolate(self, section, option, rawval, vars)
     except TypeError:
         value = rawval
     return value