Skip to content

Commit

Permalink
Added additional logging to pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Grokzen committed Apr 30, 2018
1 parent 98ef24e commit a41db86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pykwalify/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ def _validate_scalar(self, value, rule, path, done=None):
log.debug("Trimming slashes around ruby style regex. New pattern value: '{0}'".format(rule.pattern))

try:
log.debug("Matching pattern '{0}' to regex '{1}".format(rule.pattern, value))
res = re.match(rule.pattern, value, re.UNICODE)
except TypeError:
res = None
Expand All @@ -671,6 +672,8 @@ def _validate_scalar(self, value, rule, path, done=None):
path=path,
value=nativestr(str(value)),
pattern=rule._pattern))
else:
log.debug("Pattern matched...")

if rule.range is not None:
if not is_scalar(value):
Expand Down

0 comments on commit a41db86

Please sign in to comment.