Changeset 3458 for trunk/GSASIIobj.py


Ignore:
Timestamp:
Jun 28, 2018 4:50:46 PM (4 years ago)
Author:
toby
Message:

Complete basestring fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIobj.py

    r3447 r3458  
    25622562        '''
    25632563        # Patch: for old-style expressions with a (now removed step size)
    2564         if '2' not in platform.python_version_tuple()[0]: basestring = str
     2564        if '2' in platform.python_version_tuple()[0]:
     2565            basestr = basestring
     2566        else:
     2567            basestr = str
    25652568        for v in self.eObj.assgnVars:
    2566             if not isinstance(self.eObj.assgnVars[v], basestring):
     2569            if not isinstance(self.eObj.assgnVars[v], basestr):
    25672570                self.eObj.assgnVars[v] = self.eObj.assgnVars[v][0]
    25682571        self.parmDict = {}
     
    25822585        # look at first value in parmDict to determine its type
    25832586        parmsInList = True
    2584         if '2' not in platform.python_version_tuple()[0]: basestring = str
     2587        if '2' in platform.python_version_tuple()[0]:
     2588            basestr = basestring
     2589        else:
     2590            basestr = str
    25852591        for key in parmDict:
    25862592            val = parmDict[key]
    2587             if isinstance(val, basestring):
     2593            if isinstance(val, basestr):
    25882594                parmsInList = False
    25892595                break
Note: See TracChangeset for help on using the changeset viewer.