This commit is contained in:
Jack 2016-08-15 17:54:43 -04:00
parent 66396de6a3
commit d8c4e2a72e

View file

@ -116,15 +116,15 @@ class Validator(dict):
@cmd(IF_KEY) @cmd(IF_KEY)
def _if_key(self, rx_value, key, if_true, if_else): def _if_key(self, rx_value, key, if_true, if_else):
if key in rx_value: if key in rx_value:
self._handle(if_true, rx_value) return self._handle(if_true, rx_value)
self._handle(if_else, rx_value) return self._handle(if_else, rx_value)
@cmd(IF_VAL) @cmd(IF_VAL)
def _if_val(self, rx_value, key, val, if_true, if_else): def _if_val(self, rx_value, key, val, if_true, if_else):
if key in rx_value: if key in rx_value:
if rx_value[key] == val: if rx_value[key] == val:
self._handle(if_true, rx_value) return self._handle(if_true, rx_value)
self._handle(if_else, rx_value) return self._handle(if_else, rx_value)
@cmd(LOAD) @cmd(LOAD)
def _load(self, rx_value, key, value): def _load(self, rx_value, key, value):