Skip to content

Commit

Permalink
Merge pull request volatilityfoundation#1466 from j-t-1/configuration
Browse files Browse the repository at this point in the history
Tweak configuration.py
  • Loading branch information
ikelos authored Dec 25, 2024
2 parents 1f91fd4 + 79fe1c5 commit 93b09fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions volatility3/framework/interfaces/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
def path_join(*args) -> str:
"""Joins configuration paths together."""
# If a path element (particularly the first) is empty, then remove it from the list
args = tuple([arg for arg in args if arg])
args = tuple(arg for arg in args if arg)
return CONFIG_SEPARATOR.join(args)


Expand Down Expand Up @@ -772,8 +772,7 @@ def make_subconfig(
str: The newly generated full configuration path
"""
random_config_dict = "".join(
random.SystemRandom().choice(string.ascii_uppercase + string.digits)
for _ in range(8)
random.SystemRandom().choices(string.ascii_uppercase + string.digits, k=8)
)
new_config_path = path_join(base_config_path, random_config_dict)
# TODO: Check that the new_config_path is empty, although it's not critical if it's not since the values are merged in
Expand Down

0 comments on commit 93b09fd

Please sign in to comment.