@level.setter
    def level(self, value):
        if not _is_int(value):
            raise TypeError("'level' attribute must be an integer")
        if 'EXTLEVEL' in self._header:
            self._header['EXTLEVEL'] = value
        else:
            self._header['EXTLEVEL'] = (value, 'extension level')
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/hdu/base.py/_BaseHDU.level/original