def _checkZeroDiv(num, dnum):
    try:
        return num/dnum
    except ZeroDivisionError:
        print("ERROR: found a division by zero")
simple division check to avoid ZeroDivisionError
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/specfiledata.py/_checkZeroDiv