From 598cd8708003b59c9df4939f2b38c09489b4e71e Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Mon, 15 Dec 2014 18:23:13 +0000 Subject: [PATCH] daemon: Export the filename as a global variable when executing a file. --- daemon/sbin/core-daemon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/sbin/core-daemon b/daemon/sbin/core-daemon index 0a7cd7e2..42298949 100755 --- a/daemon/sbin/core-daemon +++ b/daemon/sbin/core-daemon @@ -938,7 +938,8 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler): opensessionxml(session, filename, start=True) else: t = threading.Thread(target = execfile, - args=(filename, {'server': server})) + args=(filename, {'__file__': filename, + 'server': server})) t.daemon = True t.start() time.sleep(0.25) # allow time for session creation