Skip to content

Commit 0c09ecb

Browse files
author
Machinexa2
authored
The previous fix caused an error thats why new fix
#115 I didnt expect the target_file to come as io.TextIOWrapper but i thought it would come as filename. And this fixes it. Also, this time there's no error because i tested it locally on my pc.,
1 parent 5a42a74 commit 0c09ecb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Interlace/lib/core/input.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os.path
22
import sys
3+
from io import TextIOWrapper
34
from argparse import ArgumentParser
45
from math import ceil
56
from random import sample, choice
@@ -252,7 +253,7 @@ def process_commands(arguments):
252253
ranges.add(arguments.target)
253254
else:
254255
target_file = arguments.target_list
255-
if not os.path.exists(target_file):
256+
if not isinstance(target_file, TextIOWrapper):
256257
if not sys.stdin.isatty():
257258
target_file = sys.stdin
258259
ranges.update([target.strip() for target in target_file if target.strip()])

0 commit comments

Comments
 (0)