Skip to content

Commit dfc3452

Browse files
committed
cli: Fix broken logging statements
1 parent 8698921 commit dfc3452

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

cli/cloe_launch/exec.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,20 @@ def __init__(self, conf, conanfile=None):
323323
self.preserve_env = False
324324
self.conan_options = []
325325

326-
logging.info("Profile name:", self.profile)
326+
logging.info("Profile name: {}".format(self.profile))
327327
logging.info("Configuration:")
328-
logging.info(" ", "\n ".join(self.profile_data.split("\n")))
328+
logging.info(" {}".format("\n ".join(self.profile_data.split("\n"))))
329329

330330
# Prepare runtime environment
331-
logging.info("Runtime directory:", self.runtime_dir)
331+
logging.info("Runtime directory: {}".format(self.runtime_dir))
332332

333333
def _read_conf_profile(self, conf) -> None:
334334
self.profile = conf.current_profile
335335
self.profile_path = conf.profile_path(self.profile)
336336
self.profile_data = conf.read(self.profile)
337337

338338
def _read_anonymous_profile(self, conanfile) -> None:
339-
logging.info("Source profile:", conanfile)
339+
logging.info("Source profile: {}".format(conanfile))
340340
self.profile_path = conanfile
341341
with open(conanfile, "r") as file:
342342
self.profile_data = file.read()
@@ -350,7 +350,7 @@ def runtime_env_path(self) -> str:
350350
def _prepare_runtime_dir(self) -> None:
351351
# Clean and create runtime directory
352352
self.clean()
353-
logging.debug("Create:", self.runtime_dir)
353+
logging.debug("Create: {}".format(self.runtime_dir))
354354
os.makedirs(self.runtime_dir)
355355

356356
def _prepare_virtualrunenv(self) -> None:
@@ -420,7 +420,7 @@ def _prepare_runtime_env(self, use_cache: bool = False) -> Environment:
420420
return env
421421

422422
def _write_runtime_env(self, env: Environment) -> None:
423-
logging.debug("Write:", self.runtime_env_path())
423+
logging.debug("Write: {}".format(self.runtime_env_path()))
424424
env.export(self.runtime_env_path())
425425

426426
def _process_arg(self, src_path) -> str:
@@ -471,7 +471,7 @@ def _prepare_plugin_setups(self, env: Environment) -> List[PluginSetup]:
471471
def clean(self) -> None:
472472
"""Clean the runtime directory."""
473473
if os.path.exists(self.runtime_dir):
474-
logging.debug("Remove:", self.runtime_dir)
474+
logging.debug("Remove: {}".format(self.runtime_dir))
475475
shutil.rmtree(self.runtime_dir, ignore_errors=True)
476476

477477
def shell(
@@ -507,7 +507,7 @@ def shell(
507507
" The following plugin drivers may contain setup() and teardown()"
508508
)
509509
logging.warning(" that will not be called automatically within the shell.")
510-
logging.warning()
510+
logging.warning("")
511511
for plugin in plugin_setups:
512512
logging.warning(" {}".format(plugin.plugin))
513513

@@ -551,7 +551,7 @@ def exec(
551551
if debug:
552552
cmd.insert(0, "gdb")
553553
cmd.insert(1, "--args")
554-
logging.info("Exec:", " ".join(cmd))
554+
logging.info("Exec: {}".format(" ".join(cmd)))
555555
logging.info("---")
556556
print(end="", flush=True)
557557
result = subprocess.run(cmd, check=False, env=env.as_dict())

cli/cloe_launch/utility.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def run_cmd(
1010
) -> subprocess.CompletedProcess:
1111
"""Run a command quietly, only printing stderr if the command fails."""
1212

13-
logging.info("Exec:", " ".join(cmd))
13+
logging.info("Exec: {}".format(" ".join(cmd)))
1414
result = subprocess.run(
1515
cmd,
1616
check=False,

0 commit comments

Comments
 (0)