|
Download tasks/codeql_python_benchmark51_v2/pyvul-135c7fcada946877931a/post_context.md from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-135c7fcada946877931a/post_context.md
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_python_benchmark51_v2/pyvul-135c7fcada946877931a/post_context.md
-
curl -L -o post_context.md https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-135c7fcada946877931a/post_context.md
1.69 kB
Patch-overlapping Python context after the fix
ceilometer/agent.py — class:ConfigManagerBase (lines 45-65)
class ConfigManagerBase(object):
"""Base class for managing configuration file refresh"""
def __init__(self, conf):
self.conf = conf
def load_config(self, cfg_file):
"""Load a configuration file and set its refresh values."""
if os.path.exists(cfg_file):
cfg_loc = cfg_file
else:
cfg_loc = self.conf.find_file(cfg_file)
if not cfg_loc:
LOG.debug("No pipeline definitions configuration file found! "
"Using default config.")
cfg_loc = pkg_resources.resource_filename(
__name__, 'pipeline/data/' + cfg_file)
with open(cfg_loc) as fap:
conf = yaml.safe_load(fap)
LOG.debug("Config file: %s", conf)
return conf
ceilometer/agent.py — function:ConfigManagerBase.load_config (lines 51-65)
def load_config(self, cfg_file):
"""Load a configuration file and set its refresh values."""
if os.path.exists(cfg_file):
cfg_loc = cfg_file
else:
cfg_loc = self.conf.find_file(cfg_file)
if not cfg_loc:
LOG.debug("No pipeline definitions configuration file found! "
"Using default config.")
cfg_loc = pkg_resources.resource_filename(
__name__, 'pipeline/data/' + cfg_file)
with open(cfg_loc) as fap:
conf = yaml.safe_load(fap)
LOG.debug("Config file: %s", conf)
return conf