mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 06:44:23 +01:00
The previous fix caused an error thats why new fix
https://github.com/codingo/Interlace/issues/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.,
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os.path
|
||||
import sys
|
||||
from io import TextIOWrapper
|
||||
from argparse import ArgumentParser
|
||||
from math import ceil
|
||||
from random import sample, choice
|
||||
@@ -252,7 +253,7 @@ class InputHelper(object):
|
||||
ranges.add(arguments.target)
|
||||
else:
|
||||
target_file = arguments.target_list
|
||||
if not os.path.exists(target_file):
|
||||
if not isinstance(target_file, TextIOWrapper):
|
||||
if not sys.stdin.isatty():
|
||||
target_file = sys.stdin
|
||||
ranges.update([target.strip() for target in target_file if target.strip()])
|
||||
|
||||
Reference in New Issue
Block a user