1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 10:11:14 +00:00

shutil.which

To eliminate deprecation warning
This commit is contained in:
Harshit Vijay 2024-09-21 10:59:12 +05:30
parent c7e7e1d884
commit 4905c9417a

View File

@ -3,7 +3,7 @@ import sys
import tty import tty
import termios import termios
import colorama import colorama
from distutils.spawn import find_executable from shutil import which
from .. import const from .. import const
init_output = colorama.init init_output = colorama.init
@ -38,7 +38,7 @@ def get_key():
def open_command(arg): def open_command(arg):
if find_executable('xdg-open'): if which('xdg-open'):
return 'xdg-open ' + arg return 'xdg-open ' + arg
return 'open ' + arg return 'open ' + arg