Better UX, use of os to concatenate path

This commit is contained in:
Spitap
2022-08-05 15:20:11 +02:00
parent e546d2cb23
commit 53e3e3ec58
8 changed files with 35 additions and 32 deletions

View File

@@ -46,10 +46,10 @@ class Postwhite(base.Installer):
self.install_from_archive(SPF_TOOLS_REPOSITORY, install_dir)
postw_dir = self.install_from_archive(
POSTWHITE_REPOSITORY, install_dir)
postwhiteBackupConf = self.restore+"custom/postwhite.conf"
postwhiteBackupConf = os.path.join(self.restore, "custom/postwhite.conf")
if self.restore and os.path.isfile(postwhiteBackupConf):
utils.printcolor("Restoring postwhite.conf backup.", utils.GREEN)
utils.copy_file(postwhiteBackupConf, "/etc")
utils.printcolor("postwhite.conf restored from backup", utils.GREEN)
else:
utils.copy_file(os.path.join(postw_dir, "postwhite.conf"), "/etc")
postw_bin = os.path.join(postw_dir, "postwhite")