Commits

Brodie Rao  committed 29390f8

Fixed TypeError when printing warnings

  • Participants
  • Parent commits 532dabc

Comments (0)

Files changed (1)

File pyflakes/scripts/pyflakes.py

                 offset = offset - (len(text) - len(line))
 
             sys.stderr.write('%s:%d: %s\n' % (filename, lineno, msg))
-            sys.stderr.write(line + '\n')
+            sys.stderr.write('%s\n' % line)
 
             if offset is not None:
                 sys.stderr.write(' ' * offset + ' ^\n')
         w = checker.Checker(tree, filename)
         w.messages.sort(key=lambda m: m.lineno)
         for warning in w.messages:
-            sys.stdout.write(warning + '\n')
+            sys.stdout.write('%s\n' % warning)
         return len(w.messages)