- Timestamp:
- May 15, 2014 9:42:00 AM (11 years ago)
- 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 7a67f4da
- Parents:
- 6b20c4e
- Location:
- src/sans
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/readers/cansas_reader.py
r92a2ecd ra3b635b 535 535 :param datainfo: Data1D object 536 536 """ 537 538 537 if not issubclass(datainfo.__class__, Data1D): 539 538 raise RuntimeError, "The cansas writer expects a Data1D instance" … … 858 857 859 858 # Return the document, and the SASentry node associated with 860 # the data we just wrote 861 859 # the data we just wrote 860 # If the calling function was not the cansas reader, return a minidom 861 # object rather than an lxml object. 862 862 frm = inspect.stack()[1] 863 mod = inspect.getmodule(frm[0]) 864 mod_name = mod.__name__ 863 mod_name = frm[1].replace("\\", ".").replace(".pyc", "") 864 mod_name = mod_name.replace(".py", "") 865 mod = mod_name.split("src.") 866 if len(mod) == 1: 867 mod_name = mod[0] 868 else: 869 mod_name = mod[1] 865 870 if mod_name != "sans.dataloader.readers.cansas_reader": 866 string = self.to_string(doc, pp= True)871 string = self.to_string(doc, pp=False) 867 872 doc = parseString(string) 868 873 node_name = entry_node.tag 869 874 node_list = doc.getElementsByTagName(node_name) 870 875 entry_node = node_list.item(0) 871 876 872 877 return doc, entry_node 873 878 … … 948 953 conv(value, units=local_unit)) 949 954 except: 955 exc_type, exc_value, exc_traceback = sys.exc_info() 950 956 err_mess = "CanSAS reader: could not convert" 951 957 err_mess += " %s unit [%s]; expecting [%s]\n %s" \ 952 % (variable, units, local_unit, sys.exc_value)958 % (variable, units, local_unit, exc_value) 953 959 self.errors.append(err_mess) 954 960 if optional: -
src/sans/guiframe/gui_manager.py
r17c62b6 ra3b635b 1948 1948 if temp is not None: 1949 1949 doc = temp 1950 1950 1951 1951 # Write the XML document 1952 1952 extens = APPLICATION_STATE_EXTENSION … … 1962 1962 except: 1963 1963 msg = "Error occurred while saving: " 1964 msg += "To save, at lea t one application panel "1964 msg += "To save, at least one application panel " 1965 1965 msg += "should have a data set.." 1966 1966 wx.PostEvent(self, StatusEvent(status=msg))
Note: See TracChangeset
for help on using the changeset viewer.