You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2021/01/06 19:26:58 UTC
[allura] branch master updated: Handle more status codes from
youtube oembed
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new b7e0a06 Handle more status codes from youtube oembed
b7e0a06 is described below
commit b7e0a06956bc34c89252dbc32604cf0ada652989
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Wed Jan 6 13:32:05 2021 -0500
Handle more status codes from youtube oembed
---
Allura/allura/lib/macro.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index bd9e250..3a85bea 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -470,7 +470,7 @@ def embed(url=None):
log.exception('Could not embed: {}'.format(url))
return 'Could not embed: {}'.format(url)
except six.moves.urllib.error.HTTPError as e:
- if e.code == 404:
+ if e.code in (403, 404):
return 'Video not available'
else:
log.exception('Could not embed: {}'.format(url))