More unpickling error catching.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 19 Mar 2009 06:14:59 +0000 (23:14 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 19 Mar 2009 06:14:59 +0000 (23:14 -0700)
Cython/Compiler/Scanning.py

index 6c2144fc5a0fa0301673760c4759210a22d8d9ac..059e32e3f68ba75982b9ba62e3ebb49f6e59268a 100644 (file)
@@ -84,7 +84,7 @@ def open_pickled_lexicon(expected_hash):
                 print("Lexicon hash mismatch:")       ###
                 print("   expected " + expected_hash) ###
                 print("   got     " + actual_hash)    ###
-        except IOError, e:
+        except (IOError, pickle.UnpicklingError), e:
             print("Warning: Unable to read pickled lexicon " + lexicon_pickle)
             print(e)
     if f: