Troubleshooting pyinstaller.

This commit is contained in:
lwark
2024-07-29 08:21:47 -05:00
parent e85a4bba6f
commit f5e34991d7
8 changed files with 103 additions and 34 deletions

View File

@@ -188,7 +188,10 @@ class App(QMainWindow):
current_month_bak = current_month_bak.with_suffix(".db")
if not current_month_bak.exists() and "demo" not in self.ctx.database_path.__str__():
logger.info("No backup found for this month, backing up database.")
shutil.copyfile(self.ctx.database_path, current_month_bak)
try:
shutil.copyfile(self.ctx.backup_path, current_month_bak)
except PermissionError as e:
logger.error(f"Couldn't backup database due to: {e}")
case "postgresql+psycopg2":
logger.warning(f"Backup function not yet implemented for psql")
current_month_bak = current_month_bak.with_suffix(".psql")