def _write_file(self): try: fh = codecs.open(self.current_eaxs_file, "ab", "utf-8") fh.write(self.get_root_element_attributes()) fh.close() CommonMethods.set_eaxs_file(self.current_eaxs_file) except FileNotFoundError as e: self.logger.error("{}: {}".format(e, self.current_eaxs_file))
def write_global_id(self): try: fh = codecs.open(CommonMethods.get_eaxs_filename(), "ab", "utf-8") fh.write(self.get_id()) fh.close() CommonMethods.set_eaxs_file(CommonMethods.get_eaxs_filename()) except FileNotFoundError as e: self.logger.error("{}: {}".format( e, CommonMethods.get_eaxs_filename()))