Changeset b65ae90 in sasview
- Timestamp:
- Apr 1, 2014 6:22:22 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:
- b099388
- Parents:
- d0ac63f
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/readers/cansas_reader.py
r92c8fec rb65ae90 305 305 return 306 306 except: 307 err_msg = "error occured" 307 err_msg = "CanSAS reader: could not convert the units" 308 self.errors.append(err_msg) 308 309 return 309 310 else: … … 414 415 or node_value.lower() == "nan": 415 416 node_value = "0.0" 416 try: 417 node_value, unit = self._unit_conversion(\ 417 node_value, unit = self._unit_conversion(\ 418 418 cs_values.current_level, attr, data1d, \ 419 419 tagname, node_value, cs_values.ns_optional) 420 except TypeError:421 print "TypeError with units of {0} and node of {1}".format(attr['unit'], tagname)422 420 423 421 # If appending to a dictionary (meta_data | run_name) … … 463 461 except AttributeError as e: 464 462 pass 465 466 463 464 except TypeError: 465 pass 467 466 except Exception as e: 468 467 exc_type, exc_obj, exc_tb = sys.exc_info() -
test/sansdataloader/test/utest_abs_reader.py
rd0ac63f rb65ae90 350 350 351 351 self.assertEqual(self.data.meta_data['loader'], "CanSAS 1D") 352 self.assertEqual(len(self.data.errors), 0)352 self.assertEqual(len(self.data.errors), 1) 353 353 354 354
Note: See TracChangeset
for help on using the changeset viewer.