Fixed a small buglet, if using with_items with yum and so on, only optimize the package list if the package list is all strings

This commit is contained in:
Michael DeHaan
2013-03-01 18:32:32 -05:00
parent 129e0b8baf
commit 7ac5e462ef
2 changed files with 7 additions and 2 deletions

View File

@@ -654,4 +654,9 @@ def get_diff(diff):
except UnicodeDecodeError:
return ">> the files are different, but the diff library cannot compare unicode strings"
def is_list_of_strings(items):
for x in items:
if not isinstance(x, basestring):
return False
return True