Skip to content

Commit

Permalink
Merge pull request #925 from sphinx-contrib/flush-debug-header-output
Browse files Browse the repository at this point in the history
rest: flush header debug prints
  • Loading branch information
jdknight authored Mar 18, 2024
2 parents c991e32 + beb9b44 commit f76606d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinxcontrib/confluencebuilder/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _process_request(self, method, path, *args, **kwargs):
print('(debug) Request]')
print(f'{req.method} {req.url}')
print('\n'.join(f'{k}: {v}' for k, v in req.headers.items()))
print('')
print('', flush=True)

# perform the rest request
rsp = self.session.send(req, timeout=self.timeout)
Expand All @@ -346,7 +346,7 @@ def _process_request(self, method, path, *args, **kwargs):
print('(debug) Response]')
print(f'Code: {rsp.status_code}')
print('\n'.join(f'{k}: {v}' for k, v in rsp.headers.items()))
print('')
print('', flush=True)

# if confluence or a proxy reports a retry-after delay (to pace us),
# track it to delay the next request made
Expand Down

0 comments on commit f76606d

Please sign in to comment.