Skip to content

Commit

Permalink
Bug 1680114 - Fix use of iteritems in WebDriver helpers, r=whimboo,we…
Browse files Browse the repository at this point in the history
…bdriver-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D99253
  • Loading branch information
jgraham committed Dec 10, 2020
1 parent 24a6624 commit 5edfffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import math
import sys

from six import iteritems

import webdriver

from tests.support import defaults
Expand Down Expand Up @@ -112,7 +114,7 @@ def deep_update(source, overrides):
Update a nested dictionary or similar mapping.
Modify ``source`` in place.
"""
for key, value in overrides.iteritems():
for key, value in iteritems(overrides):
if isinstance(value, collections.Mapping) and value:
returned = deep_update(source.get(key, {}), value)
source[key] = returned
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
def iteritems(d):
"""Create a key-value iterator for the given dict in both Python 2.x and
Python 3.x environments"""
if hasattr(d, "iteritems"):
return d.iteritems()
return d.items()
from six import iteritems

def merge_dictionaries(first, second):
"""Given two dictionaries, create a third that defines all specified
Expand Down

0 comments on commit 5edfffa

Please sign in to comment.