Changeset 21357


Ignore:
Timestamp:
11/10/16 03:25:10 (8 years ago)
Author:
sjohnsen
Message:

CHG:added OrderedDict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/io/loadvars.py

    r21303 r21357  
    66from re import findall
    77from os import path
     8from collections import OrderedDict
    89from whichdb import whichdb
    910from collections import OrderedDict
     
    9899                                        listtype=curclass.groups[keylist[0]].classtype
    99100                                        if listtype=='dict':
    100                                                 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [{} for i in range(max(1,len(curclass.groups)))]
     101                                                nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [OrderedDict() for i in range(max(1,len(curclass.groups)))]
    101102                                        else:
    102103                                                nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [getattr(__import__(listtype),listtype)() for i in range(max(1,len(curclass.groups)))]
     
    106107                                        Tree=nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]]
    107108                        else:
    108                                 curclass=NCFile.groups[classtree[mod][0]]
     109                                curclass=NCFile.groups[classtree[mod][0]]
    109110                                nvdict['md'].__dict__[mod] = getattr(classtype[mod][1],classtype[mod][0])()
    110111                                Tree=nvdict['md'].__dict__[classtree[mod][0]]
Note: See TracChangeset for help on using the changeset viewer.