diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py index 9ba4e0e19..cc8e72be0 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py @@ -41,13 +41,13 @@ import os import logging from twisted.internet.utils import getProcessValue +from twisted.python.procutils import which from deluge.plugins.pluginbase import CorePluginBase import deluge.component as component import deluge.configmanager from deluge.core.rpcserver import export from deluge.common import windows_check -from extractor.which import which log = logging.getLogger(__name__) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/which.py b/deluge/plugins/Extractor/deluge/plugins/extractor/which.py deleted file mode 100644 index 80090b663..000000000 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/which.py +++ /dev/null @@ -1,17 +0,0 @@ -def which(program): - # Author Credit: Jay @ http://stackoverflow.com/a/377028 - import os - def is_exe(fpath): - return os.path.isfile(fpath) and os.access(fpath, os.X_OK) - - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None