netjsonconfig/backends/base/backend.py
def _load(self, config):
        """
        Loads config from string or dict
        """
        if isinstance(config, six.string_types):
            try:
                config = json.loads(config)
            except ValueError:
                pass
        if not isinstance(config, dict):
            raise TypeError('config block must be an istance '
                            'of dict or a valid NetJSON string')
        return config
def _load(self, config):
        """
        Loads config from string or dict
        """
        if isinstance(config, six.string_types):
            try:
                config = json.loads(config)
            except ValueError:
                pass
        if not isinstance(config, dict):
            raise TypeError('config block must be an istance '
                            'of dict or a valid NetJSON string')
        return config
def _load ( self , config ) : if isinstance ( config , six . string_types ) : try : config = json . loads ( config ) except ValueError : pass if not isinstance ( config , dict ) : raise TypeError ( 'config block must be an istance ' 'of dict or a valid NetJSON string' ) return config
Loads config from string or dict
Loads config from string or dict