python/retrace: Open bz2 files correctly.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 31 May 2009 19:53:22 +0000 (12:53 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 14 Aug 2009 19:05:51 +0000 (20:05 +0100)
src/gallium/state_trackers/python/retrace/parse.py

index b0f3e8a..b08d368 100755 (executable)
@@ -371,7 +371,7 @@ class Main:
                     stream = GzipFile(arg, 'rt')
                 elif arg.endswith('.bz2'):
                     from bz2 import BZ2File
-                    stream = BZ2File(arg, 'rt')
+                    stream = BZ2File(arg, 'rU')
                 else:
                     stream = open(arg, 'rt')
                 self.process_arg(stream, options)