def update_patched_modules(): for patch in os.environ.get("DATADOG_PATCH_MODULES", '').split(','): if len(patch.split(':')) != 2: log.debug("skipping malformed patch instruction") continue module, should_patch = patch.split(':') if should_patch.lower() not in ['true', 'false']: log.debug("skipping malformed patch instruction for %s", module) continue EXTRA_PATCHED_MODULES.update({module: should_patch.lower() == 'true'})
def update_patched_modules(): modules_to_patch = os.environ.get('DATADOG_PATCH_MODULES') if not modules_to_patch: return for patch in modules_to_patch.split(','): if len(patch.split(':')) != 2: log.debug('skipping malformed patch instruction') continue module, should_patch = patch.split(':') if should_patch.lower() not in ['true', 'false']: log.debug('skipping malformed patch instruction for %s', module) continue EXTRA_PATCHED_MODULES.update({module: should_patch.lower() == 'true'})
def update_patched_modules(): modules_to_patch = os.environ.get("DATADOG_PATCH_MODULES") if not modules_to_patch: return for patch in modules_to_patch.split(","): if len(patch.split(":")) != 2: log.debug("skipping malformed patch instruction") continue module, should_patch = patch.split(":") if should_patch.lower() not in ["true", "false"]: log.debug("skipping malformed patch instruction for %s", module) continue EXTRA_PATCHED_MODULES.update({module: should_patch.lower() == "true"})