daemon: Export the filename as a global variable when executing a file.

This commit is contained in:
tgoff0 2014-12-15 18:23:13 +00:00
parent 52fdc300b8
commit 598cd87080

View file

@ -938,7 +938,8 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
opensessionxml(session, filename, start=True) opensessionxml(session, filename, start=True)
else: else:
t = threading.Thread(target = execfile, t = threading.Thread(target = execfile,
args=(filename, {'server': server})) args=(filename, {'__file__': filename,
'server': server}))
t.daemon = True t.daemon = True
t.start() t.start()
time.sleep(0.25) # allow time for session creation time.sleep(0.25) # allow time for session creation