Skip to content

Commit 9c7e90a

Browse files
authored
Update PyCall.jl
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 ```
1 parent 8a98fb4 commit 9c7e90a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PyCall.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,14 @@ function _pywith(EXPR,VAR,TYPE,BLOCK)
651651
$(VAR==nothing ? :() : :($(esc(VAR)) = value))
652652
$(esc(BLOCK))
653653
catch err
654+
global exc
654655
exc = false
655656
if !(@pycall exit(mgr, pyimport(:sys).exc_info()...)::Bool)
656657
throw(err)
657658
end
658659
end
659660
finally
661+
global exc
660662
if exc
661663
exit(mgr, nothing, nothing, nothing)
662664
end

0 commit comments

Comments
 (0)