Changeset ea2a7348 in sasview


Ignore:
Timestamp:
Jul 21, 2016 5:44:15 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:
8976865
Parents:
df332d8
Message:

Fix things when a title isn't input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/file_converter/converter_panel.py

    rd112c30 rea2a7348  
    7474    def convert_to_cansas(self, data, filename): 
    7575        reader = CansasReader() 
     76        entry_attrs = None 
     77        if self.run_name is not None: 
     78            entry_attrs = { 'name': self.run_name } 
    7679        reader.write(filename, data, 
    77             sasentry_attrs={ 'name': self.run_name }) 
     80            sasentry_attrs=entry_attrs) 
    7881 
    7982    def extract_data(self, filename): 
     
    132135        elif not isinstance(self.run, list): 
    133136            self.run = [self.run] 
     137 
     138        if self.title is None: 
     139            self.title = '' 
    134140 
    135141        metadata = { 
Note: See TracChangeset for help on using the changeset viewer.