replace distutils for python 3.12

This commit is contained in:
Branch Vincent 2023-10-08 09:54:07 -07:00
parent 62e0767c50
commit dd26fb91a0
No known key found for this signature in database

View File

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