From 61c2c744a1d1170d6e6a193536885f736ba4ca7e Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Thu, 4 May 2023 19:07:00 -0400 Subject: [PATCH] maintainers/scripts/remove-old-aliases.py: support quoted attrset keys --- maintainers/scripts/remove-old-aliases.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maintainers/scripts/remove-old-aliases.py b/maintainers/scripts/remove-old-aliases.py index c5629c829594..8f04a9be4f17 100755 --- a/maintainers/scripts/remove-old-aliases.py +++ b/maintainers/scripts/remove-old-aliases.py @@ -100,11 +100,12 @@ def convert_to_throw(date_older_list: list[str]) -> list[tuple[str, str]]: date_older_list.remove(line) continue - alias = before_equal.strip() + alias = before_equal + alias_unquoted = before_equal.strip('"') after_equal_list = [x.strip(";:") for x in after_equal.split()] converted = ( - f"{indent}{alias} = throw \"'{alias}' has been renamed to/replaced by" + f"{indent}{alias} = throw \"'{alias_unquoted}' has been renamed to/replaced by" f" '{after_equal_list.pop(0)}'\";" f' # Converted to throw {datetime.today().strftime("%Y-%m-%d")}' )