Skip to content

Commit 25bbbb5

Browse files
authored
Merge pull request #330 from desultory/dev
black format, improve logging
2 parents 6b0a7c5 + ee2efa7 commit 25bbbb5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ugrd/generator_helpers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
from .exceptions import ValidationError
1111

12-
__version__ = "1.7.0"
13-
__author__ = "desultory"
14-
12+
__version__ = "1.7.1"
1513

1614
_RANDOM_BUILD_ID = str(uuid4())
1715

@@ -240,7 +238,7 @@ def print_err(ret) -> None:
240238
if not fail_silent:
241239
print_err(cmd) # Print the full error output if not failing silently
242240
if fail_hard: # Fail hard means raise an exception
243-
raise RuntimeError("Failed to run command: %s" % " ".join(cmd.args))
241+
raise RuntimeError("Failed to run command: %s" % c_(" ".join(cmd.args), "red", bright=True))
244242

245243
return cmd
246244

src/ugrd/initramfs_dict.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class InitramfsConfigDict(UserDict):
3939
"validated": bool, # A flag to indicate if the config has been validated, mostly used for log levels
4040
"custom_parameters": dict, # Custom parameters loaded from imports
4141
"custom_processing": dict, # Custom processing functions which will be run to validate and process parameters
42-
"_processing": dict, # A dict of queues containing parameters which have been set before the type was known
42+
"_processing": dict, # A dict of queues containing parameters which have been set before the type was known
4343
"test_copy_config": NoDupFlatList, # A list of config values which are copied into test images, from the parent
4444
}
4545

@@ -275,7 +275,9 @@ def _process_imports(self, import_type: str, import_value: dict) -> None:
275275
import_masks = [import_masks] if isinstance(import_masks, str) else import_masks
276276
for mask in import_masks:
277277
if mask in function_names:
278-
self.logger.warning(f"[{c_(module_name, bright=True)}] Skipping import of masked function: {c_(mask, 'yellow')}")
278+
self.logger.warning(
279+
f"[{c_(module_name, bright=True)}] Skipping import of masked function: {c_(mask, 'yellow')}"
280+
)
279281
function_names.remove(mask)
280282
if import_type == "custom_init":
281283
self.logger.warning("Skipping custom init function: %s" % mask)

0 commit comments

Comments
 (0)