Fix script conditions not working with Python3.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@21647 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
68e659dc84
commit
9dbb9fdaa9
|
@ -271,7 +271,7 @@ class Dialog:
|
|||
path = os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python/dialog/pre/', action + '.py')
|
||||
if os.path.isfile(path):
|
||||
try:
|
||||
exec(open(path).read())
|
||||
exec(open(path).read(), globals())
|
||||
except:
|
||||
Crossfire.Log(Crossfire.LogError, "CFDialog: Failed to evaluate condition %s." % condition)
|
||||
verdict = False
|
||||
|
|
Loading…
Reference in New Issue