2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 11:19:52 +01:00

Move wafcache optional imports

This commit is contained in:
Waf Project 2024-04-01 11:18:07 +02:00
parent ec63a7dd38
commit 9f0773cfba

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):