try-except around particle load

This commit is contained in:
cxgeorge 2002-10-28 21:44:10 +00:00
parent 36853fa4c3
commit 2a4eed754c

View File

@ -204,10 +204,13 @@ class ParticleEffect(NodePath):
def loadConfig(self, filename): def loadConfig(self, filename):
"""loadConfig(filename)""" """loadConfig(filename)"""
if vfs: try:
exec vfs.readFile(filename) if vfs:
else: exec vfs.readFile(filename)
execfile(filename.toOsSpecific()) else:
execfile(filename.toOsSpecific())
except:
self.notify.error('loadConfig: failed to load particle file: '+filename)