This fixes an edge case when using lazrs in a multiprocessing context, where pickling is involved. The message when an error occurs also contains a pickling error of pylaz.LazrsError and it can be confusing to the user what the real error message is.
>>> import lazrs
>>> import pickle
>>> pickle.dumps(lazrs.LazrsError)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'pylaz.LazrsError'>: import of module 'pylaz' failed
This fixes an edge case when using lazrs in a multiprocessing context, where pickling is involved. The message when an error occurs also contains a pickling error of
pylaz.LazrsError
and it can be confusing to the user what the real error message is.After the fix, the error is picklable: