Changeset 1523


Ignore:
Timestamp:
Oct 7, 2014 12:43:33 PM (8 years ago)
Author:
toby
Message:

change isinstance in patch code

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1522 r1523  
    53325332    if 'wtFactor' not in data[0]:
    53335333        data[0] = {'wtFactor':1.0}
    5334     if isinstance(data[1],list) and kind == 'HKLF':
     5334    #if isinstance(data[1],list) and kind == 'HKLF':
     5335    if 'list' in str(type(data[1])) and kind == 'HKLF':
    53355336        RefData = {'RefList':[],'FF':[]}
    53365337        for ref in data[1]:
     
    56325633        data = G2frame.PatternTree.GetItemPyData(item)
    56335634#patch
    5634         if isinstance(data,list):
     5635        if 'list' in str(type(data)):
    56355636            data = {'peaks':data,'sigDict':{}}
    56365637            G2frame.PatternTree.SetItemPyData(item,data)
  • trunk/GSASIIphsGUI.py

    r1515 r1523  
    52825282            reflSets = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId,'Reflection Lists'))
    52835283            reflData = reflSets[phaseName]
    5284             if isinstance(reflData,list):       #patch for old reflection data
     5284            if 'list' in str(type(reflData)):       #patch for old reflection data
     5285            #if isinstance(reflData,list):       #patch for old reflection data
    52855286                RefData = {'RefList':[],'FF':[]}
    52865287                for ref in reflData:
     
    53775378            reflSets = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId,'Reflection Lists'))
    53785379            reflDict = reflSets[phaseName]
    5379             if isinstance(reflDict,list):       #patch for old reflection data
     5380            if 'list' in str(type(reflDict)):       #patch for old reflection data
     5381            #if isinstance(reflDict,list):       #patch for old reflection data
    53805382                RefData = {'RefList':[],'FF':[]}
    53815383                for ref in reflDict:
     
    55825584    if 'MCSA' not in data:
    55835585        data['MCSA'] = {'Models':[{'Type':'MD','Coef':[1.0,False,[.8,1.2],],'axis':[0,0,1]}],'Results':[],'AtInfo':{}}
    5584     if isinstance(data['MCSA']['Results'],dict):
     5586    #if isinstance(data['MCSA']['Results'],dict):
     5587    if 'dict' in str(type(data['MCSA']['Results'])):
    55855588        data['MCSA']['Results'] = []
    55865589#end patch   
  • trunk/GSASIIstrIO.py

    r1496 r1523  
    327327                HKLFdata.update(datum[1][0])        #weight factor
    328328#patch
    329                 if isinstance(datum[1][1],list):
     329                if 'list' in str(type(datum[1][1])):
     330                #if isinstance(datum[1][1],list):
    330331                    RefData = {'RefList':[],'FF':{}}
    331332                    for ref in datum[1][1]:
Note: See TracChangeset for help on using the changeset viewer.