diff --git a/Lib/profile.py b/Lib/profile.py index 5df1025ed0f..b92bd918825 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -145,7 +145,6 @@ def __init__(self, timer=None): if not timer: if os.name == 'mac': - import MacOS self.timer = MacOS.GetTicks self.dispatcher = self.trace_dispatch_mac self.get_time = _get_time_mac @@ -177,6 +176,7 @@ def __init__(self, timer=None): # list (for performance). Note that we can't assume # the timer() result contains two values in all # cases. + import operator def get_time_timer(timer=timer, reduce=reduce, reducer=operator.add): return reduce(reducer, timer(), 0)