1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From a2e5a9a4cdb65b93dbf4b3ebdf1bf51da80b95f7 Mon Sep 17 00:00:00 2001
From: SVN-Git Migration <python-modules-team@lists.alioth.debian.org>
Date: Mon, 12 Oct 2015 15:17:21 -0700
Subject: restore sys.argv in case of exception
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500814
Patch-Name: restore_sys_argv.patch
---
scipy/weave/build_tools.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scipy/weave/build_tools.py b/scipy/weave/build_tools.py
index 696407e..4a3c146 100644
--- a/scipy/weave/build_tools.py
+++ b/scipy/weave/build_tools.py
@@ -292,6 +292,9 @@ def build_extension(module_path,compiler_name='',build_dir=None,
configure_python_path(build_dir)
except SyntaxError: # TypeError:
success = 0
+ except Exception, e:
+ restore_sys_argv()
+ raise e
# restore argv after our trick...
restore_sys_argv()
|