[entropy.client.interfaces.trigger] fix _EntropyPySandbox.run() with Python3

This commit is contained in:
Fabio Erculiani
2011-09-07 08:51:36 +02:00
parent 6c11081a21
commit c14373c24f

View File

@@ -426,13 +426,15 @@ class Trigger:
self._entropy = Entropy
def run(self, stage, pkgdata, trigger_file):
my_ext_status = 1
globalz = globals()
local = locals()
if os.path.isfile(trigger_file):
with open(trigger_file) as trig_f:
exec(compile(trig_f.read(), trigger_file, 'exec'))
exec(compile(trig_f.read(), trigger_file, 'exec'),
globalz, local)
if os.path.isfile(trigger_file):
os.remove(trigger_file)
return my_ext_status
return local.get("my_ext_status", 1)
def _do_trigger_call_ext_generic(self):