Skip to content
This repository was archived by the owner on Feb 26, 2019. It is now read-only.

Commit 5db8c5c

Browse files
correct order of imports
1 parent 741c37d commit 5db8c5c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/pip/_internal/download.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,22 @@ def download(self, target_relpath, dest_dir, dest_filename):
379379
if 'TUF_CONFIG_FILE' in os.environ:
380380
import glob
381381
import tempfile
382-
import tuf.log
383-
import tuf.settings
384382

385-
# We *always* turn off TUF logging.
383+
# We always turn off TUF logging.
384+
import tuf.settings
386385
tuf.settings.ENABLE_FILE_LOGGING = False
387386
# By default, set the TUF console logging level to >= CRITICAL.
387+
import tuf.log
388388
logging.getLogger("tuf").setLevel(logging.CRITICAL)
389+
390+
# Import what we need from TUF.
391+
from tuf.client.updater import Updater
392+
389393
# Also set non-verbose, quiet in-toto logging.
394+
import in_toto.log
390395
logging.getLogger("in_toto").setLevelVerboseOrQuiet(False, True)
391-
from tuf.client.updater import Updater
392396

397+
# Import what we need from in-toto.
393398
from in_toto import verifylib
394399
from in_toto.models.metadata import Metablock
395400
from in_toto.util import import_public_keys_from_files_as_dict

0 commit comments

Comments
 (0)