At line 102 of factories.py inside datatype_factory(), there is a print(e) line that causes the warning messages such as {} is not an HL7 valid date value to be written to standard out when invalid data is included in a parsed message.
It is a useful message in many cases but for my particular application, the parsing error message is not needed and is polluting the stdout.
It is easy enough to work around by redirecting the stdout handles, but I think in general this message should be passed to a python warning so that the user could have more control over how to handle them. (Ignore, write to stdout, treat it as an exception, etc.)
If implementing warnings is too much change, maybe VALIDATION_LEVEL.QUIET should suppress these prints?
At line 102 of
factories.py
insidedatatype_factory()
, there is aprint(e)
line that causes the warning messages such as{} is not an HL7 valid date value
to be written to standard out when invalid data is included in a parsed message.It is a useful message in many cases but for my particular application, the parsing error message is not needed and is polluting the stdout.
It is easy enough to work around by redirecting the stdout handles, but I think in general this message should be passed to a python warning so that the user could have more control over how to handle them. (Ignore, write to stdout, treat it as an exception, etc.)
If implementing warnings is too much change, maybe
VALIDATION_LEVEL.QUIET
should suppress these prints?