Skip to content

Commit cac393a

Browse files
yt-msMidnighter
authored andcommitted
refactor: PR feedback
1 parent 6895258 commit cac393a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/structurizr/api/structurizr_client.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,15 @@ def _add_headers(
276276

277277
def _archive_workspace(self, json: str) -> None:
278278
"""Store the workspace."""
279-
if self.workspace_archive_location is not None:
280-
location = self._create_archive_filename()
281-
logger.debug(
282-
f"Archiving workspace {self.workspace_id} to"
283-
f" '{self.workspace_archive_location}'."
284-
)
285-
with gzip.open(location, mode="wt") as handle:
286-
handle.write(json)
279+
if self.workspace_archive_location is None:
280+
return
281+
location = self._create_archive_filename()
282+
logger.debug(
283+
f"Archiving workspace {self.workspace_id} to"
284+
f" '{self.workspace_archive_location}'."
285+
)
286+
with gzip.open(location, mode="wt") as handle:
287+
handle.write(json)
287288

288289
def _create_archive_filename(self) -> Path:
289290
"""Generate a filename for a workspace archive."""

0 commit comments

Comments
 (0)