Changeset 04ce9ac in sasview


Ignore:
Timestamp:
Sep 6, 2018 11:36:09 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
88ada06
Parents:
04f775d
Message:

small type-checking fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r04f775d r04ce9ac  
    7575    # TODO: (when the sasmodels implementation is concrete, clean this up) 
    7676    choices = None 
    77     if type(param.choices) is list and len(param.choices) > 0: 
     77    if isinstance(param.choices, (list, tuple)) and len(param.choices) > 0: 
    7878        # The choices property is concrete in sasmodels, probably will use this 
    7979        choices = param.choices 
    80     elif type(param.units) is list: 
    81         choices = param.units 
     80    elif isinstance(param.units, (list, tuple)): 
     81        choices = [str(x) for x in param.units] 
    8282 
    8383    cbox = None 
Note: See TracChangeset for help on using the changeset viewer.