diff options
Diffstat (limited to 'BuildManager/build.py')
-rw-r--r-- | BuildManager/build.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/BuildManager/build.py b/BuildManager/build.py index 73a1442..4efe006 100644 --- a/BuildManager/build.py +++ b/BuildManager/build.py @@ -1,7 +1,7 @@ from BuildManager.fileutil import * from BuildManager.package import * from BuildManager import * -import thread +import _thread import subprocess import sys, os import time @@ -10,7 +10,7 @@ import glob __all__ = ["PackageBuilder"] -GLOBAL_PKGLIST_LOCK = thread.allocate_lock() +GLOBAL_PKGLIST_LOCK = _thread.allocate_lock() STAGE_UNPACK = 0 STAGE_PREP = 1 @@ -56,12 +56,12 @@ class PackageBuilder: return True elif self.pkgsleft > 1 and self.pkgsleft % 10 != 0: logger.info("package list has %d packages" % pkgsleft) - self.pkglist_lock = thread.allocate_lock() + self.pkglist_lock = _thread.allocate_lock() self.failures = 0 if self.opts.parallel != 1: logger.info("starting threads") for i in range(self.opts.parallel-1): - thread.start_new_thread(self_processlist, ()) + _thread.start_new_thread(self_processlist, ()) self._processlist() while self.pkgsleft > 0: time.sleep(2) @@ -163,7 +163,7 @@ def filterpkglist(pkglist, directory, rule): filterfunc = lambda x: not filterfunc_tmp(x) else: filterfunc = getattr(filterlist, rule) - pkglist[:] = filter(filterfunc, pkglist) + pkglist[:] = list(filter(filterfunc, pkglist)) def buildpkglist(pkglist, stage, unpack_dir, passtrough="", |