~spud/spud/trunk

Viewing all changes in revision 539.

  • Committer: Cian Wilson
  • Date: 2017-03-03 05:40:30 UTC
  • mfrom: (538.1.1 pythonnewkeywarning)
  • Revision ID: cwilson@ldeo.columbia.edu-20170303054030-nd0bkj41c54knnun
This merge implements a fix for exception handling in set_option through the python interface - specifically handling SpudNewKeyWarnings.

Previously it would raise an exception but not return the right state (NULL) 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: