Эх сурвалжийг харах

HUE-5553 [metadata] Use a Python 2.6 compatible OrderedDict

Romain Rigaux 9 жил өмнө
parent
commit
c5e1f344e9

+ 4 - 1
desktop/core/ext-py/navoptapi-0.1.0/navoptapi/auth.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 base64 import urlsafe_b64encode
-from collections import OrderedDict
+try:
+  from collections import OrderedDict
+except ImportError:
+  from ordereddict import OrderedDict # Python 2.6
 from email.utils import formatdate
 import json
 import logging