Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_piwik_engines(): """ Return the search engine parser definitions stored in this module. We don't cache this result since it's only supposed to be called once. """ stream = pkg_resources.resource_stream with stream(__name__, 'search_engines.json') as json_stream: if PY3: if hasattr(json_stream, 'buffer'): json_stream = TextIOWrapper(json_stream.buffer, encoding='utf-8') else: json_stream = TextIOWrapper(json_stream, encoding='utf-8') _piwik_engines = json.load(json_stream) return _piwik_engines