← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~cjwatson/apport/python3 into lp:apport

 

Colin Watson has proposed merging lp:~cjwatson/apport/python3 into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)

For more details, see:
https://code.launchpad.net/~cjwatson/apport/python3/+merge/89597

A small tweak to improve Python 3 support; Python 3 no longer has file(), only open().
-- 
https://code.launchpad.net/~cjwatson/apport/python3/+merge/89597
Your team Apport upstream developers is requested to review the proposed merge of lp:~cjwatson/apport/python3 into lp:apport.
=== modified file 'bin/apport-retrace'
--- bin/apport-retrace	2012-01-04 08:18:39 +0000
+++ bin/apport-retrace	2012-01-22 17:40:29 +0000
@@ -312,11 +312,11 @@
             reportfile)
 
 if options.core_file:
-    report['CoreDump'] = file(options.core_file).read()
+    report['CoreDump'] = open(options.core_file).read()
 if options.executable:
     report['ExecutablePath'] = options.executable
 if options.procmaps:
-    report['ProcMaps'] = file(options.procmaps).read()
+    report['ProcMaps'] = open(options.procmaps).read()
 if options.rebuild_package_info and 'ExecutablePath' in report:
     report.add_package_info()
 

=== modified file 'data/general-hooks/parse_segv.py'
--- data/general-hooks/parse_segv.py	2011-11-01 19:55:36 +0000
+++ data/general-hooks/parse_segv.py	2012-01-22 17:40:29 +0000
@@ -360,9 +360,9 @@
         print('  Usage: %s Registers.txt Disassembly.txt ProcMaps.txt' % (sys.argv[0]))
         sys.exit(0)
     elif len(sys.argv)==4:
-        segv = ParseSegv(file(sys.argv[1]).read(), \
-                         file(sys.argv[2]).read(), \
-                         file(sys.argv[3]).read())
+        segv = ParseSegv(open(sys.argv[1]).read(), \
+                         open(sys.argv[2]).read(), \
+                         open(sys.argv[3]).read())
         understood, reason, details = segv.report()
         print ('%s\n\n%s' % (reason, details))
         rc = 0