28 lines
897 B
Diff
28 lines
897 B
Diff
|
From c374feb62af75dfe18e8c81fb9cb556d678487ce Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
||
|
<psuarezhernandez@suse.com>
|
||
|
Date: Tue, 24 Apr 2018 13:50:49 +0100
|
||
|
Subject: [PATCH] Initialize __context__ retcode for functions handled
|
||
|
via schedule util module
|
||
|
|
||
|
---
|
||
|
salt/utils/schedule.py | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py
|
||
|
index de057477a3..6cb3ce0ef8 100644
|
||
|
--- a/salt/utils/schedule.py
|
||
|
+++ b/salt/utils/schedule.py
|
||
|
@@ -701,6 +701,7 @@ class Schedule(object):
|
||
|
for global_key, value in six.iteritems(func_globals):
|
||
|
self.functions[mod_name].__globals__[global_key] = value
|
||
|
|
||
|
+ self.functions.pack['__context__']['retcode'] = 0
|
||
|
ret['return'] = self.functions[func](*args, **kwargs)
|
||
|
|
||
|
if not self.standalone:
|
||
|
--
|
||
|
2.15.1
|
||
|
|
||
|
|