Remove print statements

"print item" raises an exception when type of item is
jinja2.runtime.StrictUndefined
Merge pull request #6634 from pilou-/fix

Remove print statements