From 854ffed98894b8aa8b51973c0ba13fb75093e715 Mon Sep 17 00:00:00 2001 From: Erik Johnson 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 95bca7fb1b..1b4b7e0e46 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -5008,7 +5008,8 @@ def get_diff(file1, *salt.utils.data.decode(args) ) ) - return ret + return ret + return '' def manage_file(name, -- 2.13.7