diff options
Diffstat (limited to 'cloudinit/config/cc_scripts_per_boot.py')
-rw-r--r-- | cloudinit/config/cc_scripts_per_boot.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cloudinit/config/cc_scripts_per_boot.py b/cloudinit/config/cc_scripts_per_boot.py index 3e093d0e..30bd69d9 100644 --- a/cloudinit/config/cc_scripts_per_boot.py +++ b/cloudinit/config/cc_scripts_per_boot.py @@ -7,8 +7,8 @@ # This file is part of cloud-init. See LICENSE file for license information. """Scripts Per Boot: Run per boot scripts""" +import logging import os -from logging import Logger from cloudinit import subp from cloudinit.cloud import Cloud @@ -37,20 +37,19 @@ meta: MetaSchema = { } __doc__ = get_meta_doc(meta) +LOG = logging.getLogger(__name__) SCRIPT_SUBDIR = "per-boot" -def handle( - name: str, cfg: Config, cloud: Cloud, log: Logger, args: list -) -> None: +def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None: # Comes from the following: # https://forums.aws.amazon.com/thread.jspa?threadID=96918 runparts_path = os.path.join(cloud.get_cpath(), "scripts", SCRIPT_SUBDIR) try: subp.runparts(runparts_path) except Exception: - log.warning( + LOG.warning( "Failed to run module %s (%s in %s)", name, SCRIPT_SUBDIR, |