Skip to content

Commit

Permalink
confluence: correctly report a failed pdf-export, even when the error…
Browse files Browse the repository at this point in the history
… occurs <100%
  • Loading branch information
MaZderMind committed Jul 20, 2023
1 parent 5d9cd15 commit 96f82b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2723,12 +2723,12 @@ def get_pdf_download_url_for_confluence_cloud(self, url):
progress_response = self.get(poll_url)
percentage_complete = int(progress_response.get("progress", 0))
task_state = progress_response.get("state")
if percentage_complete == 100:
if task_state == "FAILED":
log.error("PDF conversion not successful.")
return None
elif percentage_complete == 100:
running_task = False
log.info("Task completed - {task_state}".format(task_state=task_state))
if task_state == "FAILED":
log.error("PDF conversion not successful.")
return None
log.debug("Extract task results to download PDF.")
task_result_url = progress_response.get("result")
else:
Expand Down

0 comments on commit 96f82b5

Please sign in to comment.