Fix py38 error

Change-Id: I47644f60474eb5cfc57eebaef60804900358afd9
This commit is contained in:
zhurong 2020-04-13 02:00:56 -07:00
parent 04f507a64b
commit 9936fe5fb3

View File

@ -18,6 +18,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import copy
import json
import jsonschema
@ -317,7 +318,8 @@ class ValidatedComplexQuery(object):
@staticmethod
def lowercase_keys(mapping):
"""Converts the values of the keys in mapping to lowercase."""
items = mapping.items()
loop_mapping = copy.deepcopy(mapping)
items = loop_mapping.items()
for key, value in items:
del mapping[key]
mapping[key.lower()] = value