blob: 0f726ffa64b1a06b4fd6743eed2b261efb795eeb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
###############################################################################
# Description
###############################################################################
# Display any warnings
###############################################################################
# Imports
###############################################################################
import sys
###############################################################################
# Public functions
###############################################################################
def warning_printer(stream):
out_of_order_ids = []
for record in stream:
if (record.record_type == "meta" and
record.type_name == "out_of_order_warning"):
out_of_order_ids.append(record.id)
if len(out_of_order_ids) > 0:
sys.stderr.write(
"WARNING: The following {0} records were out of order:\n{1}\n".format(
len(out_of_order_ids), out_of_order_ids))
|