File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ cdef object prepare_cffi(bitgen_t *bitgen):
121
121
"""
122
122
try :
123
123
import cffi
124
- except ImportError :
124
+ except ImportError as e :
125
125
raise ImportError ('cffi cannot be imported.' ) from e
126
126
127
127
ffi = cffi .FFI ()
Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ def process_pyx(fromfile, tofile):
58
58
# try the cython in the installed python first (somewhat related to scipy/scipy#2397)
59
59
import Cython
60
60
from Cython .Compiler .Version import version as cython_version
61
- except ImportError :
61
+ except ImportError as e :
62
62
# The `cython` command need not point to the version installed in the
63
63
# Python running this script, so raise an error to avoid the chance of
64
64
# using the wrong version of Cython.
65
- raise OSError ( " Cython needs to be installed in "
66
- "Python as a module" ) from e
65
+ msg = ' Cython needs to be installed in Python as a module'
66
+ raise OSError ( msg ) from e
67
67
else :
68
68
# check the version, and invoke through python
69
69
from distutils .version import LooseVersion
You can’t perform that action at this time.
0 commit comments