Changeset e090ba90 in sasview for src/sas/sascalc/fit/pagestate.py
- Timestamp:
- Oct 11, 2018 1:59:57 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
- Children:
- 88d2e70
- Parents:
- 67ed543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/pagestate.py
r863ac2c re090ba90 650 650 #Truncating string so print doesn't complain of being outside margins 651 651 if sys.platform != "win32": 652 MAX_STRING_LENG HT= 50653 if len(file_value) > MAX_STRING_LENG HT:654 file_value = "File name:.."+file_value[-MAX_STRING_LENG HT+10:]652 MAX_STRING_LENGTH = 50 653 if len(file_value) > MAX_STRING_LENGTH: 654 file_value = "File name:.."+file_value[-MAX_STRING_LENGTH+10:] 655 655 file_name = CENTRE % file_value 656 656 if len(title) == 0: … … 905 905 doc_model = newdoc.createElement('model_list_item') 906 906 doc_model.setAttribute('checked', str(model[0].GetValue())) 907 keys = model[1].keys()907 keys = list(model[1].keys()) 908 908 doc_model.setAttribute('name', str(keys[0])) 909 909 values = model[1].get(keys[0]) … … 964 964 if node.get('version'): 965 965 # Get the version for model conversion purposes 966 x = re.sub( '[^\d.]', '', node.get('version'))966 x = re.sub(r'[^\d.]', '', node.get('version')) 967 967 self.version = tuple(int(e) for e in str.split(x, ".")) 968 968 # The tuple must be at least 3 items long … … 984 984 try: 985 985 self.timestamp = float(entry.get('epoch')) 986 except Exception :986 except Exception as exc: 987 987 msg = "PageState.fromXML: Could not" 988 msg += " read timestamp\n %s" % sys.exc_value988 msg += " read timestamp\n %s" % exc 989 989 logger.error(msg) 990 990 … … 1282 1282 if isinstance(data.run_name, dict): 1283 1283 # Note: key order in dict is not guaranteed, so sort 1284 name = data.run_name.keys()[0]1284 name = list(data.run_name.keys())[0] 1285 1285 else: 1286 1286 name = data.run_name
Note: See TracChangeset
for help on using the changeset viewer.