pxe: bugfix wrong try

This commit is contained in:
pedro 2024-09-26 12:04:05 -03:00
parent 603e9c4986
commit a95e687591
1 changed files with 3 additions and 3 deletions

View File

@ -272,9 +272,9 @@ def save_snapshot_in_disk(snapshot, path):
path, path,
datetime.now().strftime("%Y%m%d-%H_%M_%S"), datetime.now().strftime("%Y%m%d-%H_%M_%S"),
snapshot['uuid']) snapshot['uuid'])
with open(fallback_filename, "w") as f: with open(fallback_filename, "w") as f:
f.write(json.dumps(snapshot)) f.write(json.dumps(snapshot))
print(f"workbench: INFO: Snapshot written in fallback path '{fallback_filename}'") print(f"workbench: INFO: Snapshot written in fallback path '{fallback_filename}'")
except Exception as e: except Exception as e:
print(f"workbench: ERROR: Failed to write in fallback path: {fallback_error}. Could not save snapshot locally.") print(f"workbench: ERROR: Failed to write in fallback path: {fallback_error}. Could not save snapshot locally.")