summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_seed_random.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_seed_random.py')
-rw-r--r--cloudinit/config/cc_seed_random.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/cloudinit/config/cc_seed_random.py b/cloudinit/config/cc_seed_random.py
index 1c1b81d8..0abf7957 100644
--- a/cloudinit/config/cc_seed_random.py
+++ b/cloudinit/config/cc_seed_random.py
@@ -11,7 +11,6 @@
import base64
import os
from io import BytesIO
-from logging import Logger
from textwrap import dedent
from cloudinit import log as logging
@@ -110,9 +109,7 @@ def handle_random_seed_command(command, required, env=None):
subp.subp(command, env=env, capture=False)
-def handle(
- name: str, cfg: Config, cloud: Cloud, log: Logger, args: list
-) -> None:
+def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None:
mycfg = cfg.get("random_seed", {})
seed_path = mycfg.get("file", "/dev/urandom")
seed_data = mycfg.get("data", b"")
@@ -129,7 +126,7 @@ def handle(
seed_data = seed_buf.getvalue()
if len(seed_data):
- log.debug(
+ LOG.debug(
"%s: adding %s bytes of random seed entropy to %s",
name,
len(seed_data),
@@ -144,7 +141,7 @@ def handle(
env["RANDOM_SEED_FILE"] = seed_path
handle_random_seed_command(command=command, required=req, env=env)
except ValueError as e:
- log.warning("handling random command [%s] failed: %s", command, e)
+ LOG.warning("handling random command [%s] failed: %s", command, e)
raise e