Skip to content

Commit

Permalink
Use get to access build dictionary (#10797)
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd authored Oct 5, 2023
1 parent 309a596 commit 3a0b024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readthedocs/projects/tasks/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def sigint_received(*args, **kwargs):
# Only allow to cancel the build if it's not already uploading the files.
# This is to protect our users to end up with half of the documentation uploaded.
# TODO: remove this condition once we implement "Atomic Uploads"
if self.data.build["state"] == BUILD_STATE_UPLOADING:
if self.data.build.get("state") == BUILD_STATE_UPLOADING:
log.warning('Ignoring cancelling the build at "Uploading" state.')
return

Expand Down

0 comments on commit 3a0b024

Please sign in to comment.