Changeset 53c771e in sasview for src/sas/qtgui/Utilities/GuiUtils.py


Ignore:
Timestamp:
Nov 9, 2017 8:45:20 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
dd150ef
Parents:
d6b8a1d
git-author:
Piotr Rozyczko <rozyczko@…> (11/08/17 09:22:45)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:45:20)
Message:

Converted unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GuiUtils.py

    rd6b8a1d r53c771e  
    528528    with open(path,'w') as out: 
    529529        has_errors = True 
    530         if data.dy is None or data.dy == []: 
     530        if data.dy is None or not data.dy: 
    531531            has_errors = False 
    532532        # Sanity check 
     
    538538                has_errors = False 
    539539        if has_errors: 
    540             if data.dx is not None and data.dx != []: 
     540            if data.dx is not None and data.dx: 
    541541                out.write("<X>   <Y>   <dY>   <dX>\n") 
    542542            else: 
     
    547547        for i in range(len(data.x)): 
    548548            if has_errors: 
    549                 if data.dx is not None and data.dx != []: 
     549                if data.dx is not None and data.dx: 
    550550                    if  data.dx[i] is not None: 
    551551                        out.write("%g  %g  %g  %g\n" % (data.x[i], 
Note: See TracChangeset for help on using the changeset viewer.