Changeset dc8a553 in sasview
- Timestamp:
- Aug 9, 2016 6:41:15 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 0e11ec7
- Parents:
- 9c500ab
- Location:
- src/sas/sascalc/file_converter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/file_converter/bsl_loader.py
r9c500ab rdc8a553 31 31 sasdata_filename = filename.replace('000.', '001.') 32 32 if sasdata_filename == filename: 33 err_msg = ("Invalid header filename {}.\n 33 err_msg = ("Invalid header filename {}.\nShould be of the format " 34 34 "Xnn000.XXX where X is any alphanumeric character and n is any" 35 35 " digit.").format(filename) -
src/sas/sascalc/file_converter/c_ext/bsl_loader.c
re070dc0 rdc8a553 170 170 input_file = fopen(self->params.filename, "rb"); 171 171 if (!input_file) { 172 // BSL filenames are 10 characters long 173 // Filename validity checked in bsl_loader.py 174 size_t filename_start = strlen(self->params.filename) - 10; 175 char *filename = self->params.filename + filename_start; 176 char *err_msg = (char *)malloc(sizeof(char) * 32); 177 178 sprintf(err_msg, "Unable to open file: %s", filename); 179 180 PyErr_SetString(PyExc_RuntimeError, err_msg); 181 free(err_msg); 172 182 return NULL; 173 183 }
Note: See TracChangeset
for help on using the changeset viewer.