From 52c18506554dd7a15ab817aae438e0d42f03f903 Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Fri, 6 Jul 2018 14:08:49 -0400 Subject: [PATCH] Small addition to patterns.py --- stix2/patterns.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stix2/patterns.py b/stix2/patterns.py index 3f9cbd9..9599a53 100644 --- a/stix2/patterns.py +++ b/stix2/patterns.py @@ -64,8 +64,8 @@ class BooleanConstant(_Constant): self.value = value return - trues = ['true', 't'] - falses = ['false', 'f'] + trues = ['true', 't', '1'] + falses = ['false', 'f', '0'] try: if value.lower() in trues: self.value = True @@ -112,7 +112,7 @@ class HashConstant(StringConstant): vocab_key = _HASH_REGEX[key][1] if not re.match(_HASH_REGEX[key][0], value): raise ValueError("'%s' is not a valid %s hash" % (value, vocab_key)) - self.value = value + super(HashConstant, self).__init__(value) class BinaryConstant(_Constant):