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:
parent
c7e7e1d884
commit
4905c9417a
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user