allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] branch master updated: Handle more status codes from youtube oembed
Date Wed, 06 Jan 2021 19:26:58 GMT
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 <dbrondsema@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))


Mime
View raw message