Ignore:
Timestamp:
Oct 11, 2018 1:59:57 PM (12 months ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
Children:
88d2e70
Parents:
67ed543
Message:

remove errors and warnings from py37 tests of sascalc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/data_util/calcthread.py

    r574adc7 re090ba90  
    66from __future__ import print_function 
    77 
    8 import traceback 
    98import sys 
    109import logging 
     10import traceback 
     11from time import sleep 
     12 
    1113try: 
    1214    import _thread as thread 
    1315except ImportError: # CRUFT: python 2 support 
    1416    import thread 
    15  
    16 if sys.platform.count("darwin") > 0: 
    17     import time 
    18     stime = time.time() 
    19  
    20     def clock(): 
    21         return time.time() - stime 
    22  
    23     def sleep(t): 
    24         return time.sleep(t) 
    25 else: 
    26     from time import clock 
    27     from time import sleep 
     17try: 
     18    from time import perf_counter as clock 
     19except ImportError: # CRUFT: python < 3.3 
     20    if sys.platform.count("darwin") > 0: 
     21        from time import time as clock 
     22    else: 
     23        from time import clock 
    2824 
    2925logger = logging.getLogger(__name__) 
    30  
    3126 
    3227class CalcThread: 
     
    248243                self.exception_handler(*sys.exc_info()) 
    249244                return 
    250             except Exception: 
     245            except Exception as exc: 
    251246                pass 
    252247        logger.error(traceback.format_exc()) 
Note: See TracChangeset for help on using the changeset viewer.