- self.dom.writexml(open('ttt.xrc','w'), encoding=encd)
- self.dom.writexml(memFile, encoding=encd)
- # Put back in place
- # Remove temporary name or restore changed
- if not xxx.name:
- elem.removeAttribute('name')
- else:
- elem.setAttribute('name', xxx.name)
- if xxx.__class__ in [xxxWizardPage, xxxWizardPageSimple]:
- elem.setAttribute('class', oldCl)
+ try:
+ self.dom.writexml(memFile, encoding=encd)
+ except:
+ inf = sys.exc_info()
+ wxLogError(traceback.format_exception(inf[0], inf[1], None)[-1])
+ wxLogError('Error writing temporary file')
+ if debug: raise