summaryrefslogtreecommitdiff
path: root/ply/yacc.py
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2015-08-25 14:40:22 -0500
committerDavid Beazley <dave@dabeaz.com>2015-08-25 14:40:22 -0500
commita843b294852a1283ec6184e392a614eecf0cefa7 (patch)
tree47d71bf676746ff756ae45ceee88aea17b4f18dd /ply/yacc.py
parent242ea1a744ca408361be29820b9d126845c7aab9 (diff)
parentac0cacd80ff0e7a64d4d61892db6542c14dbade7 (diff)
downloadply-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.py3
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')