Bläddra i källkod

HUE-5553 [metadata] Use another Python 2.6 OrderedDict in serialize

Romain Rigaux 9 år sedan
förälder
incheckning
d09fc7b47d
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      desktop/core/ext-py/navoptapi-0.1.0/navoptapi/serialize.py

+ 4 - 1
desktop/core/ext-py/navoptapi-0.1.0/navoptapi/serialize.py

@@ -14,7 +14,10 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 
-from collections import OrderedDict
+try:
+  from collections import OrderedDict
+except ImportError:
+  from ordereddict import OrderedDict # Python 2.6
 import json