Skip to content

Commit

Permalink
Update PyCall.jl
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
heetbeet committed Jun 2, 2021
1 parent 8a98fb4 commit 9c7e90a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PyCall.jl
Expand Up @@ -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
Expand Down

0 comments on commit 9c7e90a

Please sign in to comment.