diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2018-12-30 09:32:30 -0600 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2018-12-30 09:32:30 -0600 |
commit | 3d1ada6a3379e48f8da34971da8be22be39324e5 (patch) | |
tree | ba46c1aa082574ee8b198389db76dce1c3afdec6 /pyparsing.py | |
parent | c3bb1856f94fe393d209d3dd95af718526497a04 (diff) | |
download | pyparsing-git-3d1ada6a3379e48f8da34971da8be22be39324e5.tar.gz |
Update Travis-CI scripts to include examples; fix bug in runTests if postParse function returns None (or any non-str value)
Diffstat (limited to 'pyparsing.py')
-rw-r--r-- | pyparsing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pyparsing.py b/pyparsing.py index 975846c..89c48d9 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -2454,7 +2454,9 @@ class ParserElement(object): success = success and not failureTests if postParse is not None: try: - out.append(postParse(t, result)) + pp_value = postParse(t, result) + if pp_value is not None: + out.append(str(pp_value)) except Exception as e: out.append("{} failed: {}: {}".format(postParse.__name__, type(e).__name__, e)) except ParseBaseException as pe: |