xzos / PyZDDE

Zemax/ OpticStudio Extension using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Closing ZRD file before raising Exception in pyzdde.zfileutils.readZRDFile

jburgalat opened this issue · comments

Hi,

First of all thanks for the great amount of work done here !

I'd just want to report an easy fixable issue:

readZRDFile() from zfileutils.py does not close the file handle before raising the NotImplementedError in case the ZRD file is not uncompressed.

I think it should be done before raising the exception as the file remains locked. If one tries to update the ZRD (for instance calculating ray tracing from Zemax) she will have some trouble with a message box prompting that the file cannot be saved.

Best regards,
Jérémie.