Changeset d888abf in sasview


Ignore:
Timestamp:
Jul 11, 2016 4:36:55 AM (8 years ago)
Author:
lewis
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2ff9e37
Parents:
6ccf18e
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:20:49)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
Message:

Fix bug when loading saved project with no output saved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/corfunc/corfunc_state.py

    ra684c64 rd888abf  
    22import sys 
    33import os 
     4import logging 
    45import sas.sascalc.dataloader 
    56from lxml import etree 
     
    161162 
    162163        # Output parameters 
    163         output = new_doc.createElement("output") 
    164         top_element.appendChild(output) 
    165         for item in output_list: 
    166             element = new_doc.createElement(item[0]) 
    167             element.appendChild(new_doc.createTextNode(self.outputs[item[0]])) 
    168             output.appendChild(element) 
     164        if self.outputs != {} and self.outputs is not None: 
     165            output = new_doc.createElement("output") 
     166            top_element.appendChild(output) 
     167            for item in output_list: 
     168                element = new_doc.createElement(item[0]) 
     169                element.appendChild(new_doc.createTextNode(self.outputs[item[0]])) 
     170                output.appendChild(element) 
    169171 
    170172        # Save the file or return the original document with the state 
Note: See TracChangeset for help on using the changeset viewer.