Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Interlace/lib/threader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import subprocess
import os
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import Event

from tqdm import tqdm

import platform

if platform.system().lower() == 'linux':
shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh"
else:
shell = None

class Task(object):
def __init__(self, command):
Expand Down Expand Up @@ -49,7 +55,8 @@ def get_lock(self):
def _run_task(self, t=False):
s = subprocess.Popen(self.task, shell=True,
stdout=subprocess.PIPE,
encoding="utf-8")
encoding="utf-8",
executable=shell)
out, _ = s.communicate()

if out != "":
Expand Down