8000 Address review comments · localstack/localstack@aa4269c · GitHub
[go: up one dir, main page]

Skip to content

Commit aa4269c

Browse files
committed
Address review comments
1 parent cce4b2d commit aa4269c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

localstack/logging/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def setup_logging_from_config():
9494
raise
9595
except Exception as e:
9696
raise RuntimeError(
97-
f"Failed to configure logging overrides ({raw_logging_override}): Malformed value. ({e})"
97+
f"Failed to configure logging overrides ({raw_logging_override})"
9898
) from e
9999

100100

localstack/utils/collections.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,15 @@ def is_comma_delimited_list(string: str, item_regex: Optional[str] = None) -> bo
536536

537537

538538
def parse_key_value_pairs(raw_text: str) -> dict:
539+
"""
540+
Parse a series of key-value pairs, in an environment variable format into a dictionary
541+
542+
>>> input = "a=b,c=d"
543+
>>> assert parse_key_value_pairs(input) == {"a": "b", "c": "d"}
544+
"""
539545
result = {}
540546
for pair in raw_text.split(","):
541-
items = pair.split("=", maxsplit=2)
547+
items = pair.split("=")
542548
if len(items) != 2:
543549
raise ValueError(f"invalid key/value pair: '{pair}'")
544550
raw_key, raw_value = items[0].strip(), items[1].strip()

0 commit comments

Comments
 (0)
0