From 9c7e90a90ea3d8301f5c0db5abb116ed45aaa0a2 Mon Sep 17 00:00:00 2001 From: heetbeet Date: Wed, 2 Jun 2021 23:39:50 +0200 Subject: [PATCH] Update PyCall.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppress warning: ``` ┌ Warning: Assignment to `#6#exc` in soft scope is ambiguous because a global variable by the same name exists: `#6#exc` will be treated as a new local. Disambiguate by using `local #6#exc` to suppress this warning or `global #6#exc` to assign to the existing global variable. └ @ C:\Users\simon\devel\empty_app\bin\julia\localdepot\packages\PyCall\BD546\src\PyCall.jl:654 ``` --- src/PyCall.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PyCall.jl b/src/PyCall.jl index 615f1171..e1a2907e 100644 --- a/src/PyCall.jl +++ b/src/PyCall.jl @@ -651,12 +651,14 @@ function _pywith(EXPR,VAR,TYPE,BLOCK) $(VAR==nothing ? :() : :($(esc(VAR)) = value)) $(esc(BLOCK)) catch err + global exc exc = false if !(@pycall exit(mgr, pyimport(:sys).exc_info()...)::Bool) throw(err) end end finally + global exc if exc exit(mgr, nothing, nothing, nothing) end