def _append_hdu_info(self, ext):
<EOL>hdu_type = self._FITS.movabs_hdu(ext+<NUM_LIT:1>)<EOL>if hdu_type == IMAGE_HDU:<EOL><INDENT>hdu = ImageHDU(self._FITS, ext, **self.keys)<EOL><DEDENT>elif hdu_type == BINARY_TBL:<EOL><INDENT>hdu = TableHDU(self._FITS, ext, **self.keys)<EOL><DEDENT>elif hdu_type == ASCII_TBL:<EOL><INDENT>hdu = AsciiTableHDU(self._FITS, ext, **self.keys)<EOL><DEDENT>else:<EOL><INDENT>mess = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>mess = mess % (ext, hdu_type)<EOL>raise IOError(mess)<EOL><DEDENT>self.hdu_list.append(hdu)<EOL>self.hdu_map[ext] = hdu<EOL>extname = hdu.get_extname()<EOL>if not self.case_sensitive:<EOL><INDENT>extname = extname.lower()<EOL><DEDENT>if extname != '<STR_LIT>':<EOL><INDENT>if extname not in self.hdu_map:<EOL><INDENT>self.hdu_map[extname] = hdu<EOL><DEDENT>ver = hdu.get_extver()<EOL>if ver > <NUM_LIT:0>:<EOL><INDENT>key = '<STR_LIT>' % (extname, ver)<EOL>self.hdu_map[key] = hdu<EOL><DEDENT><DEDENT>
internal routine

append info for indiciated extension