Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit 50f762e

Browse files
committed
[py3] Revert change from long -> int
Use `long` for py2, and `int` for py3. Otherwise we will get an integer overflow for py2 32bit.
1 parent 4ea03fe commit 50f762e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jaeger_client/thrift.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# THE SOFTWARE.
2020

2121
from past.builtins import basestring
22+
import six
2223
import socket
2324
import struct
2425

@@ -118,7 +119,8 @@ def timestamp_micros(ts):
118119
:param ts:
119120
:return:
120121
"""
121-
return int(ts * 1000000)
122+
long_fn = int if six.PY3 else long
123+
return long_fn(ts * 1000000)
122124

123125

124126
def make_zipkin_spans(spans):

0 commit comments

Comments
 (0)