Code cleanup

This commit is contained in:
Eric Torres 2019-04-15 23:32:02 -07:00
parent a42901cde6
commit 560ddcdacf

View File

@ -125,8 +125,8 @@ class PackageManager:
syslog.info("Creating a database archive") syslog.info("Creating a database archive")
archivemode = "w" if compress is None else f"w:{compress}" archivemode = f"w:{compress}" if compress else "w"
archivesuffix = ".tar" if compress is None else f".tar.{compress}" archivesuffix = f".tar.{compress}" if compress else ".tar"
with NamedTemporaryFile(delete=False, suffix=archivesuffix) as tmpfile: with NamedTemporaryFile(delete=False, suffix=archivesuffix) as tmpfile:
archive_path = Path(tmpfile.name) archive_path = Path(tmpfile.name)