diff options
author | Joe Eagar <joeedh@gmail.com> | 2015-08-09 12:15:20 -0700 |
---|---|---|
committer | Joe Eagar <joeedh@gmail.com> | 2015-08-09 12:15:20 -0700 |
commit | ac0cacd80ff0e7a64d4d61892db6542c14dbade7 (patch) | |
tree | d09028df4bc5ad5e8b8faa3db1a637f21db2e7dc /ply/yacc.py | |
parent | dbf122652d38ba03ff9f9fe4aa9bee3693e6775f (diff) | |
download | ply-ac0cacd80ff0e7a64d4d61892db6542c14dbade7.tar.gz |
check for existence of pickled parse tables before
trying to read them.
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 eb02cc2..32e3f85 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') |