Merge lp:~canonical-platform-qa/uci-config/py3-items into lp:~canonical-ci-engineering/uci-config/trunk

Proposed by Leo Arias
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 64
Merged at revision: 64
Proposed branch: lp:~canonical-platform-qa/uci-config/py3-items
Merge into: lp:~canonical-ci-engineering/uci-config/trunk
Diff against target: 30 lines (+3/-3)
1 file modified
uciconfig/stores.py (+3/-3)
To merge this branch: bzr merge lp:~canonical-platform-qa/uci-config/py3-items
Reviewer Review Type Date Requested Status
Vincent Ladeuil (community) Approve
Review via email: mp+243708@code.launchpad.net

Commit message

Use items instead of iteritems for py3 compatibility.

To post a comment you must log in.
64. By Leo Arias

Update also iterkeys.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Goodbye histerical raisins.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'uciconfig/stores.py'
2--- uciconfig/stores.py 2014-01-17 10:53:15 +0000
3+++ uciconfig/stores.py 2014-12-05 01:03:57 +0000
4@@ -49,7 +49,7 @@
5 return self.options.get(name, default)
6
7 def iter_option_names(self):
8- for k in self.options.iterkeys():
9+ for k in self.options.keys():
10 yield k
11
12 def __repr__(self):
13@@ -96,7 +96,7 @@
14
15 :param store: the store containing the section
16 """
17- for k, expected in dirty.orig.iteritems():
18+ for k, expected in dirty.orig.items():
19 actual = dirty.get(k, _DeletedOption)
20 if actual is _DeletedOption:
21 if k in self.options:
22@@ -216,7 +216,7 @@
23 # get_mutable_section() call below.
24 self.unload()
25 # Apply the changes from the preserved dirty sections
26- for section_id, dirty in dirty_sections.iteritems():
27+ for section_id, dirty in dirty_sections.items():
28 clean = self.get_mutable_section(section_id)
29 clean.apply_changes(dirty, self)
30 # Everything is clean now

Subscribers

People subscribed via source and target branches