File fix-unboundlocalerror-in-file.get_diff.patch of Package salt
From 48a4b7a7cdde9681c45c90d2d1897cfe498d15ec Mon Sep 17 00:00:00 2001
From: Erik Johnson <palehose@gmail.com>
Date: Mon, 30 Apr 2018 10:25:40 -0500
Subject: [PATCH] Fix UnboundLocalError in file.get_diff
This was only in 2018.3 head and not part of a release
Add unit test for file.get_diff
Use a lambda instead of defining a one-line function
---
salt/modules/file.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/salt/modules/file.py b/salt/modules/file.py
index 46ffd6042b..e6d80c9c3a 100644
--- a/salt/modules/file.py
+++ b/salt/modules/file.py
@@ -4604,7 +4604,8 @@ def get_diff(file1,
*salt.utils.data.decode(args)
)
)
- return ret
+ return ret
+ return ''
def manage_file(name,
--
2.17.1