Merge lp:~jtaylor/ubuntu/quantal/update-notifier/lp-1040380 into lp:ubuntu/quantal/update-notifier

Proposed by Julian Taylor
Status: Merged
Merge reported by: Dimitri John Ledkov
Merged at revision: not available
Proposed branch: lp:~jtaylor/ubuntu/quantal/update-notifier/lp-1040380
Merge into: lp:ubuntu/quantal/update-notifier
Diff against target: 55 lines (+10/-4)
3 files modified
data/hooks.py (+2/-2)
data/package-data-downloader (+2/-2)
debian/changelog (+6/-0)
To merge this branch: bzr merge lp:~jtaylor/ubuntu/quantal/update-notifier/lp-1040380
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Ubuntu branches Pending
Review via email: mp+121309@code.launchpad.net

Description of the change

python3 removed dict.has_key and python-debian has followed suit and removed it too

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Apparently we use lp:~ubuntu-core-dev/update-notifier/ubuntu which is stated in the debian/control ( I am guessing it predates lp:ubuntu/$package branches).

But no worries, I have cherry picked your change there, and will release soon.

Thanks a lot for your contribution. It should unbreak:
* upgrading to 12.10
* installing 12.10 with a CD
* using 12.10!!!

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/hooks.py'
2--- data/hooks.py 2011-10-13 09:27:26 +0000
3+++ data/hooks.py 2012-08-25 13:35:21 +0000
4@@ -50,7 +50,7 @@
5 for line in open(hooks_seen):
6 filename, mtime, cmd_run = string.split(line)
7 if os.path.exists(self.hookDir+filename) and \
8- not self._hooks.has_key(filename):
9+ filename not in self._hooks:
10 h = self.HookFile(filename)
11 h.mtime = mtime
12 h.cmd_run = cmd_run
13@@ -63,7 +63,7 @@
14 def _update(self):
15 """ update hook dict with the current state on the fs """
16 for hook in dircache.listdir(self.hookDir):
17- if self._hooks.has_key(hook):
18+ if hook in self._hooks:
19 # we have it already, check if it was motified since
20 # we last saw it
21 h = self._hooks[hook]
22
23=== modified file 'data/package-data-downloader'
24--- data/package-data-downloader 2012-05-15 16:16:08 +0000
25+++ data/package-data-downloader 2012-08-25 13:35:21 +0000
26@@ -209,13 +209,13 @@
27 files = []
28 sums = []
29 for para in hook.iter_paragraphs(open(file)):
30- if para.has_key('script'):
31+ if 'script' in para:
32 if not files:
33 record_failure(relfile)
34 break
35 command = [para['script']]
36
37- if para.has_key('should-download'):
38+ if 'should-download' in para:
39 db = debconf.DebconfCommunicator('update-notifier')
40 try:
41 should = db.get(para['should-download'])
42
43=== modified file 'debian/changelog'
44--- debian/changelog 2012-05-15 16:20:43 +0000
45+++ debian/changelog 2012-08-25 13:35:21 +0000
46@@ -1,3 +1,9 @@
47+update-notifier (0.119ubuntu11) UNRELEASED; urgency=low
48+
49+ * replace dict.has_key with key in dict (LP: #1040380)
50+
51+ -- Julian Taylor <jtaylor@ubuntu.com> Sat, 25 Aug 2012 15:30:11 +0200
52+
53 update-notifier (0.119ubuntu10) quantal; urgency=low
54
55 * Merge in changes from 0.119ubuntu8.1 which had been uploaded to

Subscribers

People subscribed via source and target branches