From 3dc9b0129b71755b2f756cfbd7f650d3154979a5 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 21 Apr 2015 14:00:00 +0100 Subject: [PATCH] Fix comparison to None --- salt/modules/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/modules/file.py b/salt/modules/file.py index 695df7ca69..19d2d2f2f6 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -1344,7 +1344,7 @@ def replace(path, raise CommandExecutionError("Exception: {0}".format(exc)) if not found and (append_if_not_found or prepend_if_not_found): - if None == not_found_content: + if not_found_content is None: not_found_content = repl if prepend_if_not_found: new_file.insert(0, not_found_content + '\n')