[cctbxbb] pyyaml - iotbx.pdb incompatibility
Luc Bourhis
luc_j_bourhis at mac.com
Tue Apr 16 02:16:31 PDT 2013
Sorry James,
I hit "Send" by mistake before I was finished correcting the cut-n-paste I did from a case where I only needed to protect against divisions by zero:
The code you need is actually
try:
division_by_zero = ext.is_division_by_zero_trapped()
invalid = ext.is_invalid_trapped()
overflow = ext.is_overflow_trapped()
ext.trap_exceptions(division_by_zero=False,
invalid=False,
overflow=False)
finally:
ext.trap_exceptions(division_by_zero=division_by_zero,
invalid=invalid,
overflow=overflow)
Best wishes,
Luc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20130416/8c8352e0/attachment.htm>
More information about the cctbxbb
mailing list