Fix date format in bwcli tests

This commit is contained in:
Théophile Diot 2024-08-19 16:20:48 +01:00
parent cfdde17efb
commit d4751a9d3f
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -144,7 +144,7 @@ try:
print(f"❌ Command failed, exiting ...\noutput: {result.output.decode()}\nexit_code: {result.exit_code}", flush=True)
exit(1)
date = datetime.strptime("-".join(Path(file.decode()).stem.split("-")[2:]), "%Y-%m-%d_%H-%M-%S").strftime("%d/%m/%Y %H:%M:%S").encode()
date = datetime.strptime("-".join(Path(file.decode()).stem.split("-")[2:]), "%Y-%m-%d_%H-%M-%S").strftime("%Y/%m/%d %H:%M:%S").encode()
found = False
for line in result.output.splitlines():
if date in line: