Changeset 5251ec6 in sasview for src/sas/sasgui/perspectives/fitting/fit_thread.py
- Timestamp:
- Oct 11, 2018 2:20:56 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 98b9f32
- Parents:
- 67ed543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fit_thread.py
rba8d326 r5251ec6 12 12 13 13 def map_apply(arguments): 14 return apply(arguments[0], arguments[1:]) 14 fn, args = arguments[0], arguments[1:] 15 return fn(*args) 15 16 16 17 class FitThread(CalcThread): … … 50 51 except KeyboardInterrupt: 51 52 msg = "Fitting: terminated by the user." 52 raise KeyboardInterrupt , msg53 raise KeyboardInterrupt(msg) 53 54 54 55 def compute(self): … … 76 77 list_q, list_q, list_handler, list_curr_thread, 77 78 list_reset_flag) 78 result = map(map_apply, inputs)79 result = list(map(map_apply, inputs)) 79 80 80 81 self.complete(result=result, … … 85 86 elapsed=time.time() - self.starttime) 86 87 87 except KeyboardInterrupt ,msg:88 except KeyboardInterrupt as msg: 88 89 # Thread was interrupted, just proceed and re-raise. 89 90 # Real code should not print, but this is an example...
Note: See TracChangeset
for help on using the changeset viewer.