From 98e34055683504e749656e0d07614e90245c6087 Mon Sep 17 00:00:00 2001 From: Vincent A Date: Thu, 7 May 2020 22:22:33 +0200 Subject: [PATCH] webcontentedit: remove setuptools dependency --- weboob/applications/webcontentedit/webcontentedit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weboob/applications/webcontentedit/webcontentedit.py b/weboob/applications/webcontentedit/webcontentedit.py index f89061b64a..5d72376f22 100644 --- a/weboob/applications/webcontentedit/webcontentedit.py +++ b/weboob/applications/webcontentedit/webcontentedit.py @@ -21,8 +21,8 @@ import os import tempfile -from distutils.spawn import find_executable import subprocess +from shutil import which from weboob.core.bcall import CallErrors from weboob.capabilities.content import CapContent, Revision @@ -72,7 +72,7 @@ def do_edit(self, line): params = [] editor = os.environ.get('EDITOR', 'vim') # check cases where /usr/bin/vi is a symlink to vim - if 'vim' in (os.path.basename(editor), os.path.basename(os.path.realpath(find_executable(editor) or '/')).replace('.nox', '')): + if 'vim' in (os.path.basename(editor), os.path.basename(os.path.realpath(which(editor) or '/')).replace('.nox', '')): params = ['-p'] subprocess.call([editor, *params, *paths]) -- GitLab