mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Test interposition with real example and fix issues encountered
Fix issues with 'configuration' variable name and incorrect reference to 'six.moves.urllib.request.Request'.
This commit is contained in:
parent
948b596fc7
commit
e2a4d9fe2c
1 changed files with 2 additions and 2 deletions
|
|
@ -165,7 +165,7 @@ def __urllib2_urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
|
|||
updater = None
|
||||
|
||||
# If this is a urllib2.Request...
|
||||
if isinstance(url, six.moves.request.Request):
|
||||
if isinstance(url, six.moves.urllib.request.Request):
|
||||
# If this is a GET HTTP method...
|
||||
if url.get_method() == "GET":
|
||||
# ...then you should check with TUF.
|
||||
|
|
@ -343,7 +343,7 @@ def refresh(configurations):
|
|||
def deconfigure(configurations):
|
||||
"""Remove TUF interposition for previously read configurations."""
|
||||
|
||||
for configuration in six.itervalues(configuration):
|
||||
for configuration in six.itervalues(configurations):
|
||||
__updater_controller.remove(configuration)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue