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-b93c2d0d6712
master
ryo_saeba 2020-12-27 12:38:58 +00:00
parent 68e659dc84
commit 9dbb9fdaa9
1 changed files with 1 additions and 1 deletions

View File

@ -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