File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 33`authorizer` -- Handle authorization of access to content
44=========================================================
55"""
6+ from __future__ import absolute_import
67
78from logging import getLogger
8- from loris_exception import AuthorizerException , ConfigError
99import requests
1010
11- from urlparse import urlparse
11+ try :
12+ from urllib .parse import urlparse
13+ except ImportError : # Python 2
14+ from urlparse import urlparse
1215
1316import jwt
1417
1922from cryptography .hazmat .primitives import hashes
2023from cryptography .hazmat .primitives .kdf .pbkdf2 import PBKDF2HMAC
2124
25+ from .loris_exception import AuthorizerException , ConfigError
2226
2327logger = getLogger (__name__ )
2428
Original file line number Diff line number Diff line change 1616import re
1717from subprocess import CalledProcessError
1818from tempfile import NamedTemporaryFile
19- from urllib import unquote , quote_plus
19+ try :
20+ from urllib .parse import unquote , quote_plus
21+ except ImportError : # Python 2
22+ from urllib import unquote , quote_plus
2023
2124import sys
2225sys .path .append ('.' )
Original file line number Diff line number Diff line change @@ -306,7 +306,6 @@ def test_access_control_allow_origin_on_bare_identifier(self):
306306 def test_access_control_allow_origin_on_info_requests (self ):
307307 uri = '/%s/info.json' % (self .test_jp2_color_id ,)
308308 resp = self .client .get (uri )
309- print resp .headers ['access-control-allow-origin' ]
310309 self .assertEqual (resp .headers ['access-control-allow-origin' ], '*' )
311310
312311 def test_access_control_allow_origin_on_img_request (self ):
You can’t perform that action at this time.
0 commit comments