Skip to content

Commit 0754abc

Browse files
committed
Fix code to match cypthon expectation
It fails to convert unicode to 'str', we have to help it out. ``` Error compiling Cython file: ------------------------------------------------------------ ... if metadata_request_timeout is None: return stmt ms = int(metadata_request_timeout / datetime.timedelta(milliseconds=1)) if ms == 0: return stmt return f"{stmt} USING TIMEOUT {ms}ms" ^ ------------------------------------------------------------ cassandra/util.py:1813:11: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. ```
1 parent 5a48872 commit 0754abc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cassandra/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1810,4 +1810,4 @@ def maybe_add_timeout_to_query(stmt: str, metadata_request_timeout: Optional[dat
18101810
ms = int(metadata_request_timeout / datetime.timedelta(milliseconds=1))
18111811
if ms == 0:
18121812
return stmt
1813-
return f"{stmt} USING TIMEOUT {ms}ms"
1813+
return str(f"{stmt} USING TIMEOUT {ms}ms")

0 commit comments

Comments
 (0)