projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c28ca95
)
Made lexicon unpickling more robust; on error it regenerates it.
author
Hoyt Koepke hoytak@gmail.com
<none@none>
Tue, 17 Mar 2009 03:10:14 +0000
(20:10 -0700)
committer
Hoyt Koepke hoytak@gmail.com
<none@none>
Tue, 17 Mar 2009 03:10:14 +0000
(20:10 -0700)
Cython/Compiler/Scanning.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Scanning.py
b/Cython/Compiler/Scanning.py
index 9ef47dc116d3055b3abf1f1ecfa9c9f94244cafa..6c2144fc5a0fa0301673760c4759210a22d8d9ac 100644
(file)
--- a/
Cython/Compiler/Scanning.py
+++ b/
Cython/Compiler/Scanning.py
@@
-102,7
+102,12
@@
def try_to_unpickle_lexicon():
if notify_lexicon_unpickling:
t0 = time()
print("Unpickling lexicon...")
- lexicon = pickle.load(f)
+ try:
+ lexicon = pickle.load(f)
+ except Exception, e:
+ print "WARNING: Exception while loading lexicon pickle, regenerating"
+ print e
+ lexicon = None
f.close()
if notify_lexicon_unpickling:
t1 = time()