Changeset 2936


Ignore:
Timestamp:
Jul 15, 2017 2:31:54 PM (4 years ago)
Author:
toby
Message:

bail out when bin lookup fails

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIpath.py

    r2927 r2936  
    479479            versions[v] = d
    480480    intVersionsList = sorted(versions.keys())
    481     if inpver < min(intVersionsList):
     481    if not intVersionsList:
     482        print('No binaries located')
     483        return
     484    elif inpver < min(intVersionsList):
    482485        vsel = min(intVersionsList)
    483486        print('Warning: The current numpy version, {}, is older than\n\tthe oldest dist version, {}'
  • trunk/GSASIIpath.py

    r2925 r2936  
    4747        if var in configDict:
    4848            del configDict[var]
    49         if parmdict[var][1] is None: continue
    50         if parmdict[var][1] == '': continue
    51         if parmdict[var][0] == parmdict[var][1]: continue
    52         configDict[var] = parmdict[var][1]
     49        if isinstance(parmdict[var],tuple):
     50            configDict[var] = parmdict[var]
     51        else:
     52            if parmdict[var][1] is None: continue
     53            if parmdict[var][1] == '': continue
     54            if parmdict[var][0] == parmdict[var][1]: continue
     55            configDict[var] = parmdict[var][1]
    5356
    5457# routines for looking a version numbers in files
     
    476479            versions[v] = d
    477480    intVersionsList = sorted(versions.keys())
    478     if inpver < min(intVersionsList):
     481    if not intVersionsList:
     482        print('No binaries located')
     483        return
     484    elif inpver < min(intVersionsList):
    479485        vsel = min(intVersionsList)
    480486        print('Warning: The current numpy version, {}, is older than\n\tthe oldest dist version, {}'
Note: See TracChangeset for help on using the changeset viewer.