0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/site_scons/mongo/__init__.py
2022-05-25 17:40:16 +00:00

21 lines
521 B
Python

# -*- mode: python; -*-
# General utility functions live in this file.
import bisect
def print_build_failures():
from SCons.Script import GetBuildFailures
for bf in GetBuildFailures():
print("%s failed: %s" % (bf.node, bf.errstr))
def insort_wrapper(target_list, target_string):
"""
Removes instances of empty list inside the list before handing it to insort.
"""
from SCons.Util import flatten
target_list[:] = flatten(target_list)
bisect.insort(target_list, target_string)