0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-24 08:30:56 +01:00
mongodb/site_scons/mongo/__init__.py
Steve McClure fedfb0e8e4 SERVER-90617: Enable python formatting checks for site_scons directory (#22301)
GitOrigin-RevId: 0cd9cfa93f7cbfee24b19f6795ae366d5fa94625
2024-05-19 00:00:43 +00:00

23 lines
523 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)