1 parent d58ae0c commit c6ba8b6Copy full SHA for c6ba8b6
1 file changed
src/ui/mainWindow.py
@@ -194,11 +194,11 @@ def on_btnWait_Import_clicked(self):
194
if not filename: return
195
try:
196
with open(filename, 'r') as file:
197
- new_ips = file.readlines()
+ new_ips = file.read().split()
198
except UnicodeDecodeError:
199
200
with open(filename, 'r', encoding='utf-8-sig') as file:
201
202
203
QMessageBox.critical(self, self.tr('错误'), self.tr('文件编码错误。请检查文件内容,然后再试。'))
204
return
0 commit comments