From: Philippe Proulx Date: Wed, 16 Mar 2016 00:29:03 +0000 (-0400) Subject: Fix: config: packet context type is mandatory and must be a struct X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b235192f5a8eaf7c8594b7018a24cd912d9897a6;p=deliverable%2Fbarectf.git Fix: config: packet context type is mandatory and must be a struct Signed-off-by: Philippe Proulx --- diff --git a/barectf/config.py b/barectf/config.py index 078ae3c..bc0e4cf 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -394,10 +394,10 @@ class _MetadataSpecialFieldsValidator: t = stream.packet_context_type if type(t) is None: - return + raise ConfigError('missing "packet-context-type" property in stream object') if type(t) is not metadata.Struct: - return + raise ConfigError('"packet-context-type": expecting a structure type') # "timestamp_begin", if exists, is an unsigned integer type, # mapped to a clock