~ubuntu-branches/ubuntu/quantal/aptdaemon/quantal

« back to all changes in this revision

Viewing changes to debian/patches/binary-mode-report-writing.patch

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2012-09-26 10:24:48 UTC
  • Revision ID: package-import@ubuntu.com-20120926102448-qhir2yjy2ydy5atz
Tags: 0.45+bzr861-0ubuntu5
debian/patches/binary-mode-report-writing.patch: open our crash
report for writing in binary mode.  Closes LP: #1054984.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: open our crash report for writing in binary mode
 
2
 Recent versions of apport are more finicky about ensuring the crash report
 
3
 handle supports writing binary output, so explicitly open the file in
 
4
 binary mode.
 
5
Author: Steve Langasek <steve.langasek@canonical.com>
 
6
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054984
 
7
 
 
8
=== modified file 'aptdaemon/crash.py'
 
9
--- a/aptdaemon/crash.py        2012-02-03 06:37:42 +0000
 
10
+++ b/aptdaemon/crash.py        2012-09-26 17:19:45 +0000
 
11
@@ -64,7 +64,7 @@
 
12
     # Write report
 
13
     report_path = apport.fileutils.make_report_path(report, uid)
 
14
     if not os.path.exists(report_path):
 
15
-        report.write(open(report_path, 'w'))
 
16
+        report.write(open(report_path, 'wb'))
 
17
 
 
18
 if __name__ == "__main__":
 
19
     apt_pkg.init_config()
 
20