def _call(name, id, *args): if debug: start_time = time.time() try: return freecivclient.call_f(id, args) finally: if debug: tpl = _profiling_calls[name] tpl[0] += 1 tpl[1] += time.time() - start_time
def _call(name, id, *args): if debug: start_time = time.time() try: return freecivclient.call_f(id, args) except OverflowError: print name, id, args raise finally: if debug: tpl = _profiling_calls[name] tpl[0] += 1 tpl[1] += time.time() - start_time
def call(name, *args): return freecivclient.call_f(functions[name], args)