From 560ddcdacfdf8d5b7d649f937845910cf9e7d956 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Mon, 15 Apr 2019 23:32:02 -0700 Subject: [PATCH] Code cleanup --- rbackup/plugins/packagemanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rbackup/plugins/packagemanager.py b/rbackup/plugins/packagemanager.py index baa4e66..bfe5db0 100644 --- a/rbackup/plugins/packagemanager.py +++ b/rbackup/plugins/packagemanager.py @@ -125,8 +125,8 @@ class PackageManager: syslog.info("Creating a database archive") - archivemode = "w" if compress is None else f"w:{compress}" - archivesuffix = ".tar" if compress is None else f".tar.{compress}" + archivemode = f"w:{compress}" if compress else "w" + archivesuffix = f".tar.{compress}" if compress else ".tar" with NamedTemporaryFile(delete=False, suffix=archivesuffix) as tmpfile: archive_path = Path(tmpfile.name)