Skip to content

Commit c06581c

Browse files
committed
replace psutil with os
1 parent 78b8070 commit c06581c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def version_scheme(version):
6363
},
6464
python_requires='>=3.6',
6565
install_requires=[
66-
'psutil',
6766
],
6867
tests_require=[
6968
'pytest',

sshuttle/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os
77
import sys
88
import platform
9-
import psutil
109

1110
import sshuttle.helpers as helpers
1211
import sshuttle.ssnet as ssnet
@@ -650,7 +649,9 @@ def check_ssh_alive():
650649
# poll() won't tell us when process exited since the
651650
# process is no longer our child (it returns 0 all the
652651
# time).
653-
if not psutil.pid_exists(serverproc.pid):
652+
try:
653+
os.kill(serverproc.pid, 0)
654+
except OSError:
654655
raise Fatal('ssh connection to server (pid %d) exited.' %
655656
serverproc.pid)
656657
else:

0 commit comments

Comments
 (0)