lcl: screenshot when error

This commit is contained in:
Gabriel Augendre 2023-06-14 08:54:03 +02:00
parent 14499eab65
commit 3df3d1059c
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import os
import time
from pathlib import Path
@ -35,6 +36,14 @@ class LclDownloader:
self.selenium.implicitly_wait(30)
def download(self) -> str:
try:
return self._download()
except Exception:
screenshot = Path(os.getenv("SCREENSHOT_DIR", default="/tmp")) / "error_download.png"
self.selenium.save_screenshot(screenshot)
raise
def _download(self) -> str:
selenium = self.selenium
click.secho("Logging in to LCL...", fg="blue")

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "ofx-processor"
version = "4.4.2"
version = "4.4.3"
description = "Personal ofx processor"
readme = "README.md"
authors = ["Gabriel Augendre <gabriel@augendre.info>"]