From ec928884508e78091feb6eacd79c1bf2830847bd Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 1 May 2019 12:03:35 -0700 Subject: [PATCH] Use ternary statement for return condition --- rbackup/config/config_files.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rbackup/config/config_files.py b/rbackup/config/config_files.py index 4d15092..067a2dd 100644 --- a/rbackup/config/config_files.py +++ b/rbackup/config/config_files.py @@ -58,10 +58,7 @@ def load_list_from_option(parser, *, section="", option="", fallback=None): try: return json.loads(parser[section][option]) except (json.decoder.JSONDecodeError, KeyError): - if fallback is None: - return [] - else: - return fallback + return [] if fallback is None else fallback def merge_files(files):