Merge lp:~takluyver/unattended-upgrades/apt-lock-crash into lp:~ubuntu-core-dev/unattended-upgrades/ubuntu

Proposed by Thomas Kluyver
Status: Merged
Merged at revision: 317
Proposed branch: lp:~takluyver/unattended-upgrades/apt-lock-crash
Merge into: lp:~ubuntu-core-dev/unattended-upgrades/ubuntu
Diff against target: 13 lines (+2/-1)
1 file modified
unattended-upgrade (+2/-1)
To merge this branch: bzr merge lp:~takluyver/unattended-upgrades/apt-lock-crash
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+133482@code.launchpad.net

Description of the change

I ran into a bytes/unicode crash on Quantal, and while fixing it, I noticed that a variable could end up undefined.

I can't get it to go into that code path now, but this change should fix things if it does end up there.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks, I merged this to trunk (and added a test).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'unattended-upgrade'
--- unattended-upgrade 2012-10-09 08:10:08 +0000
+++ unattended-upgrade 2012-11-08 14:08:26 +0000
@@ -722,7 +722,8 @@
722 cache, [pkg.name for pkg in pkgs_to_upgrade], logfile_dpkg)722 cache, [pkg.name for pkg in pkgs_to_upgrade], logfile_dpkg)
723 except Exception as e:723 except Exception as e:
724 # print unhandled exceptions here this way, while stderr is redirected724 # print unhandled exceptions here this way, while stderr is redirected
725 os.write(old_stderr, "Exception: %s" % e)725 os.write(old_stderr, ("Exception: %s\n" % e).encode('utf-8'))
726 pkg_install_success = False
726727
727 # restore728 # restore
728 os.dup2(old_stdout, 1)729 os.dup2(old_stdout, 1)

Subscribers

People subscribed via source and target branches

to all changes: