Ignore:
Timestamp:
Oct 11, 2018 2:20:56 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
Children:
98b9f32
Parents:
67ed543
Message:

improved support for py37 in sasgui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fit_thread.py

    rba8d326 r5251ec6  
    1212 
    1313def map_apply(arguments): 
    14     return apply(arguments[0], arguments[1:]) 
     14    fn, args = arguments[0], arguments[1:] 
     15    return fn(*args) 
    1516 
    1617class FitThread(CalcThread): 
     
    5051        except KeyboardInterrupt: 
    5152            msg = "Fitting: terminated by the user." 
    52             raise KeyboardInterrupt, msg 
     53            raise KeyboardInterrupt(msg) 
    5354 
    5455    def compute(self): 
     
    7677                         list_q, list_q, list_handler, list_curr_thread, 
    7778                         list_reset_flag) 
    78             result = map(map_apply, inputs) 
     79            result = list(map(map_apply, inputs)) 
    7980 
    8081            self.complete(result=result, 
     
    8586                          elapsed=time.time() - self.starttime) 
    8687 
    87         except KeyboardInterrupt, msg: 
     88        except KeyboardInterrupt as msg: 
    8889            # Thread was interrupted, just proceed and re-raise. 
    8990            # Real code should not print, but this is an example... 
Note: See TracChangeset for help on using the changeset viewer.