Move wafcache optional imports

This commit is contained in:
Waf Project 2024-04-01 11:18:07 +02:00
parent 6c84fb1bba
commit f53d3001d7
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,7 @@ To troubleshoot::
waf clean build --zone=wafcache
"""
import atexit, base64, errno, fcntl, getpass, os, re, shutil, sys, time, threading, traceback, urllib3, shlex
import atexit, base64, errno, getpass, os, re, shutil, sys, time, threading, traceback, shlex
try:
import subprocess32 as subprocess
except ImportError:
@ -444,6 +444,7 @@ def lru_evict():
"""
Reduce the cache size
"""
import fcntl
lockfile = os.path.join(CACHE_DIR, 'all.lock')
try:
st = os.stat(lockfile)
@ -474,6 +475,7 @@ def lru_evict():
class netcache(object):
def __init__(self):
import urllib3
self.http = urllib3.PoolManager()
def url_of(self, sig, i):