Skip to content

Commit df59d2a

Browse files
authored
Fix python2 python3 round compatiblity
In python2 round will return a float. need to cast it with an integer so that the string format d will not throw a value error.
1 parent 1580963 commit df59d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cassandra_sigv4/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _extract_nonce(challenge):
9393

9494
def _format_timestamp(date_time):
9595
return "{0}.{1:03d}Z".format(date_time.strftime(_SIGV4_TIMESTAMP_FORMAT),
96-
round(date_time.microsecond / 1000))
96+
int(round(date_time.microsecond / 1000)))
9797

9898

9999
def _format_datestamp(date_time):

0 commit comments

Comments
 (0)