checking for dom.encoding == None

temporary fix for wxPyAssertion from XRC library


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roman Rolinsky
2004-12-26 02:35:35 +00:00
parent f19b8f1124
commit 759c619e28

View File

@@ -875,7 +875,7 @@ Homepage: http://xrced.sourceforge.net\
dom = minidom.parse(f) dom = minidom.parse(f)
f.close() f.close()
# Set encoding global variable # Set encoding global variable
g.currentEncoding = dom.encoding if dom.encoding: g.currentEncoding = dom.encoding
# Change dir # Change dir
dir = os.path.dirname(path) dir = os.path.dirname(path)
if dir: os.chdir(dir) if dir: os.chdir(dir)
@@ -1010,7 +1010,11 @@ class App(wxApp):
frame.Show(True) frame.Show(True)
# Load resources from XRC file (!!! should be transformed to .py later?) # Load resources from XRC file (!!! should be transformed to .py later?)
frame.res = wxXmlResource('') frame.res = wxXmlResource('')
frame.res.Load(os.path.join(basePath, 'xrced.xrc')) # !!! Temporary blocking of assert failure occuring in unicode build
try:
frame.res.Load(os.path.join(basePath, 'xrced.xrc'))
except wx._core.PyAssertionError:
pass
# Load file after showing # Load file after showing
if args: if args: