summaryrefslogtreecommitdiff
path: root/numpy/linalg/lapack_lite/make_lite.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-08-04 16:45:12 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-08-04 16:45:12 -0600
commit1596415c32f6008fcacc14a3a5394787aeb44265 (patch)
treed360fa51313280b81326828b933d8927d292529e /numpy/linalg/lapack_lite/make_lite.py
parent3b91f476fbbecbd111f10efd0aae1df8eed5d667 (diff)
parentb3e3567544dc2b41e1bcc89157b977cf12ef2efb (diff)
downloadnumpy-1596415c32f6008fcacc14a3a5394787aeb44265.tar.gz
Merge branch 'main' into array-api
Diffstat (limited to 'numpy/linalg/lapack_lite/make_lite.py')
-rwxr-xr-xnumpy/linalg/lapack_lite/make_lite.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/linalg/lapack_lite/make_lite.py b/numpy/linalg/lapack_lite/make_lite.py
index cf15b2541..09ffaf840 100755
--- a/numpy/linalg/lapack_lite/make_lite.py
+++ b/numpy/linalg/lapack_lite/make_lite.py
@@ -261,8 +261,8 @@ def runF2C(fortran_filename, output_dir):
subprocess.check_call(
["f2c"] + F2C_ARGS + ['-d', output_dir, fortran_filename]
)
- except subprocess.CalledProcessError:
- raise F2CError
+ except subprocess.CalledProcessError as e:
+ raise F2CError from e
def scrubF2CSource(c_file):
with open(c_file) as fo:
@@ -275,8 +275,8 @@ def scrubF2CSource(c_file):
def ensure_executable(name):
try:
which(name)
- except:
- raise SystemExit(name + ' not found')
+ except Exception as ex:
+ raise SystemExit(name + ' not found') from ex
def create_name_header(output_dir):
routine_re = re.compile(r'^ (subroutine|.* function)\s+(\w+)\(.*$',