We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3d7f13 commit 68d301eCopy full SHA for 68d301e
1 file changed
post.py
@@ -12,6 +12,7 @@
12
import socket
13
import time
14
import sys
15
+import os
16
17
RECV_SIZE = 1024
18
POW_LIMIT = 50_000_000
@@ -51,8 +52,7 @@ def usage(program_name: str):
51
52
file_path = args.pop(0)
53
54
with open(file_path) as f:
- # TODO: This script expects files to have Unix newlines, should probably work with any newlines.
55
- content = [line.strip('\n') for line in f.readlines()]
+ content = [line.removesuffix(os.linesep) for line in f.readlines()]
56
57
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
58
0 commit comments