From 96bf04aa035673fbf190bfb435aced5507cd3c10 Mon Sep 17 00:00:00 2001 From: yannick Date: Fri, 17 Mar 2023 11:16:27 +0100 Subject: [PATCH] Add quotes to format_toml outputs --- bitwarden_access_manager.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bitwarden_access_manager.py b/bitwarden_access_manager.py index 6650245..3b5e475 100644 --- a/bitwarden_access_manager.py +++ b/bitwarden_access_manager.py @@ -146,10 +146,10 @@ def from_toml_dict(data: Dict[str, Any]) -> Member: def format_toml(self) -> str: lines = [ "[[member]]", - f"member_id = {self.id}", - f"member_name = {self.name}", - f"email = {self.email}", - f"type = {self.type.name.lower()}", + f'member_id = "{self.id}"', + f'member_name = "{self.name}"', + f'email = "{self.email}"', + f'type = "{self.type.name.lower()}"', f"access_all = {str(self.access_all).lower()}", ] return "\n".join(lines) @@ -198,9 +198,9 @@ def from_toml_dict(data: Dict[str, Any]) -> Group: def format_toml(self) -> str: lines = [ "[[group]]", - f"group_id = {self.id}", - f"group_name = {self.name}", - f"access_all = {str(self.access_all).lower()}", + f'group_id = "{self.id}"', + f'group_name = "{self.name}"', + f'access_all = "{str(self.access_all).lower()}"', ] return "\n".join(lines) @@ -286,8 +286,8 @@ def from_toml_dict(data: Dict[str, Any]) -> Collection: def format_toml(self) -> str: result = ( "[[collection]]\n" - f"collection_id = {self.id}\n" - f"external_id = {self.external_id}\n" + f'collection_id = "{self.id}"\n' + f'external_id = "{self.external_id}"\n' ) if self.member_access is not None: