diff options
Diffstat (limited to 'webmentions_ssg/tasks/discovery.py')
| -rw-r--r-- | webmentions_ssg/tasks/discovery.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webmentions_ssg/tasks/discovery.py b/webmentions_ssg/tasks/discovery.py index 456e47e..107d30a 100644 --- a/webmentions_ssg/tasks/discovery.py +++ b/webmentions_ssg/tasks/discovery.py @@ -5,6 +5,7 @@ """Discover a target Webmention endpoint and submit a POST.""" import re +from http import HTTPStatus from urllib.parse import urljoin import httpx @@ -198,7 +199,7 @@ def post_webmention( ) as response: status_url = None - if response.status_code == 201 and ( + if response.status_code == HTTPStatus.CREATED and ( location := response.headers.get("Location") ): try: |
