Code cleanup
This commit is contained in:
parent
a42901cde6
commit
560ddcdacf
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user