~cjwatson/lazr.restful/py3-fix-reraise

« back to all changes in this revision

Viewing changes to src/lazr/restful/tales.py

  • Committer: Colin Watson
  • Date: 2020-07-23 10:19:08 UTC
  • mfrom: (247.1.1 py3-dict-methods)
  • Revision ID: cjwatson@canonical.com-20200723101908-d3s0dd8meq7xzdum
[r=wgrant] Handle dict method changes in Python 3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
        # iterate through attributes one at a time because some
223
223
        # versions of docutils don't case-normalize attributes.
224
224
        for attr_dict in attr_dicts:
225
 
            for (key, val) in attr_dict.items():
 
225
            for (key, val) in list(attr_dict.items()):
226
226
                # Prefix all CSS classes with "rst-"; and prefix all
227
227
                # names with "rst-" to avoid conflicts.
228
228
                if key.lower() in ('class', 'id', 'name'):