From 0ad07716e402d57aa2cc3342baecaf91beb4ce5c Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 6 May 2024 18:50:14 +0200 Subject: [PATCH] Fix creating new config with missing keys --- npbackup/configuration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/npbackup/configuration.py b/npbackup/configuration.py index c291596..196b4f3 100644 --- a/npbackup/configuration.py +++ b/npbackup/configuration.py @@ -248,9 +248,10 @@ def key_should_be_encrypted(key: str, encrypted_options: List[str]): """ Checks whether key should be encrypted """ - for option in encrypted_options: - if option in key: - return True + if key: + for option in encrypted_options: + if option in key: + return True return False