def readline(self):
        """Readline wrapper to force readline() to return str objects."""
        line = self.fd.__class__.readline(self.fd)
        if isinstance(line, bytes):
            line = line.decode()
        return line
Readline wrapper to force readline() to return str objects.