Explorar o código

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

Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
c5e1f34
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      desktop/core/ext-py/navoptapi-0.1.0/navoptapi/auth.py

+ 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