From 4063bae5de1f00c2d81c996bc0e4bce8dfad855c Mon Sep 17 00:00:00 2001 From: Jason Portnoy Date: Wed, 11 May 2016 17:37:29 -0400 Subject: [PATCH] catch None cases for comments in jboss7 state module --- salt/states/jboss7.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/states/jboss7.py b/salt/states/jboss7.py index 1e9c4eb4d3..e08f4df6e1 100644 --- a/salt/states/jboss7.py +++ b/salt/states/jboss7.py @@ -730,6 +730,12 @@ def __check_dict_contains(dct, dict_name, keys, comment='', result=True): def __append_comment(new_comment, current_comment=''): + if current_comment is None and new_comment is None: + return '' + if current_comment is None: + return new_comment + if new_comment is None: + return current_comment return current_comment+'\n'+new_comment