~cwilson/spud/pythonnewkeywarning

Viewing all changes in revision 539.

  • Committer: Cian Wilson
  • Date: 2017-03-03 05:17:45 UTC
  • Revision ID: cwilson@ldeo.columbia.edu-20170303051745-g07dltn9dgrmu550
Fix exception handling for set_option through the python interface.

Previously it would raise an exception but not return the right code for it to be caught.  Now SpudNewKeyWarning can be caught in
python.

Additionally it was not possible to set a new option with type double through python.  This appears to be because the PyArg_Parse
function is broken (and its use discouraged in the documentation).  Switching this to PyFloat_AS_DOUBLE, which works.

Modifying the python tests to reflect these changes.

Also tidying up messages associated with python exceptions.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: