def _checkScans(scans):
    if scans is None:
        raise NameError("Provide a string or list of scans to load")
    if type(scans) == str:
        try:
            nscans = _str2rng(scans)
        except:
            raise NameError("scans string '{0}' not understood by str2rng".format(scans))
    elif type(scans) == list:
        nscans = scans
    else:
        raise NameError("Provide a string or list of scans to load")
    return nscans
simple checker for scans input
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/specfiledata.py/_checkScans