Skip to content

Commit 796b525

Browse files
authored
Default mode for FileIOMessageWriter should be wt (#1303)
Default mode for FileIOMessageWriter should be `wt` instead of `rt`.
1 parent 1693c27 commit 796b525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/io/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class FileIOMessageWriter(MessageWriter, metaclass=ABCMeta):
8282

8383
file: can.typechecking.FileLike
8484

85-
def __init__(self, file: can.typechecking.AcceptedIOType, mode: str = "rt") -> None:
85+
def __init__(self, file: can.typechecking.AcceptedIOType, mode: str = "wt") -> None:
8686
# Not possible with the type signature, but be verbose for user-friendliness
8787
if file is None:
8888
raise ValueError("The given file cannot be None")

0 commit comments

Comments
 (0)