tbodt / v8py

Write Python APIs, then call them from JavaScript using the V8 engine.
GNU Lesser General Public License v3.0
440 stars 28 forks source link

Call PyErr_Clear() after failing to import greenstack #18

Closed AlexHill closed 6 years ago

AlexHill commented 6 years ago

I haven't been able to actually test the change in the non-PyCapsule path because of issues with Python 2.6 on my system, but the PyCapsule_Import path works for me in 3.5.2 and 2.7.12 so I included it by analogy.

tbodt commented 6 years ago

The appropriate place to add this would be in greenstack.cpp.

tbodt commented 6 years ago

Also it would be a good idea to edit .travis.yml to test running v8py without greenstack installed.

codecov-io commented 6 years ago

Codecov Report

Merging #18 into master will increase coverage by 0.19%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   69.53%   69.72%   +0.19%     
==========================================
  Files          16       16              
  Lines        1208     1209       +1     
  Branches      190      190              
==========================================
+ Hits          840      843       +3     
+ Misses        241      240       -1     
+ Partials      127      126       -1
Impacted Files Coverage Δ
v8py/greenstack.cpp 36.66% <100%> (+9.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4cce5e3...daffc18. Read the comment docs.

AlexHill commented 6 years ago

Ok, I've moved the PyErr_Clear() and I'm looking at how to make Travis do what we need here.

tbodt commented 6 years ago

Looks good. Thanks!