diff options
author | David Beazley <dave@dabeaz.com> | 2015-08-25 14:40:22 -0500 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2015-08-25 14:40:22 -0500 |
commit | a843b294852a1283ec6184e392a614eecf0cefa7 (patch) | |
tree | 47d71bf676746ff756ae45ceee88aea17b4f18dd /ply/yacc.py | |
parent | 242ea1a744ca408361be29820b9d126845c7aab9 (diff) | |
parent | ac0cacd80ff0e7a64d4d61892db6542c14dbade7 (diff) | |
download | ply-a843b294852a1283ec6184e392a614eecf0cefa7.tar.gz |
Merge pull request #74 from joeedh/master
Check for existence of pickled parse tables
Diffstat (limited to 'ply/yacc.py')
-rw-r--r-- | ply/yacc.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ply/yacc.py b/ply/yacc.py index f863c7c..429ad85 100644 --- a/ply/yacc.py +++ b/ply/yacc.py @@ -1982,6 +1982,9 @@ class LRTable(object): import cPickle as pickle except ImportError: import pickle + + if not os.path.exists(filename): + raise ImportError in_f = open(filename, 'rb') |