diff --git a/py/_plugin/pytest_junitxml.py b/py/_plugin/pytest_junitxml.py
index <HASH>..<HASH> 100644
--- a/py/_plugin/pytest_junitxml.py
+++ b/py/_plugin/pytest_junitxml.py
@@ -166,6 +166,7 @@ class LogXML(object):
         logfile.writelines(self.test_logs)
         logfile.write('</testsuite>')
         logfile.close()
-        tw = session.config.pluginmanager.getplugin("terminalreporter")._tw
-        tw.line()
-        tw.sep("-", "generated xml file: %s" %(self.logfile))
+
+    def pytest_terminal_summary(self, terminalreporter):
+        tw = terminalreporter._tw
+        terminalreporter.write_sep("-", "generated xml file: %s" %(self.logfile))
don't print empty lines with junitxml file printing

--HG--
branch : trunk