mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 06:44:23 +01:00
Update threader.py
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from multiprocessing import Event
|
from multiprocessing import Event
|
||||||
|
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh"
|
||||||
|
|
||||||
class Task(object):
|
class Task(object):
|
||||||
def __init__(self, command):
|
def __init__(self, command):
|
||||||
@@ -49,7 +50,8 @@ class Task(object):
|
|||||||
def _run_task(self, t=False):
|
def _run_task(self, t=False):
|
||||||
s = subprocess.Popen(self.task, shell=True,
|
s = subprocess.Popen(self.task, shell=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
encoding="utf-8")
|
encoding="utf-8",
|
||||||
|
executable=shell)
|
||||||
out, _ = s.communicate()
|
out, _ = s.communicate()
|
||||||
|
|
||||||
if out != "":
|
if out != "":
|
||||||
|
|||||||
Reference in New Issue
Block a user