]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Replaces reduce with six.moves.reduce for py 2/3 compatibility
authorsonu.kumar <sonu.kumar@nectechnologies.in>
Mon, 3 Aug 2015 11:45:52 +0000 (17:15 +0530)
committersonu.kumar <sonu.kumar@nectechnologies.in>
Mon, 3 Aug 2015 11:53:20 +0000 (17:23 +0530)
This patch replaces "reduce" with "six.moves.reduce" to comply with
the newer python version i.e. python3.

Partially-Implements: Blueprint neutron-python3

Change-Id: Iddb52d86665123ade5920bc09f7802e29440e7dd

neutron/tests/tempest/common/generator/base_generator.py

index 5ac927c497fe26dd73e11525f75920025f12dc53..6db3f2474caeeb46603ad6995d9da410ef8e5877 100644 (file)
@@ -176,7 +176,7 @@ class BasicGeneratorSet(object):
             expected_result = generator_result[2]
             element = path.pop()
             if len(path) > 0:
-                schema_snip = reduce(dict.get, path, schema)
+                schema_snip = six.moves.reduce(dict.get, path, schema)
                 schema_snip[element] = invalid_snippet
             else:
                 schema[element] = invalid_snippet