Tests are not covering this line. I would suggest to write a test for this using StringIO.