mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-28 19:03:26 +01:00
replace psutil with os
This commit is contained in:
parent
78b80709f2
commit
c06581cf83
1
setup.py
1
setup.py
@ -63,7 +63,6 @@ setup(
|
|||||||
},
|
},
|
||||||
python_requires='>=3.6',
|
python_requires='>=3.6',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'psutil',
|
|
||||||
],
|
],
|
||||||
tests_require=[
|
tests_require=[
|
||||||
'pytest',
|
'pytest',
|
||||||
|
@ -6,7 +6,6 @@ import subprocess as ssubprocess
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
import psutil
|
|
||||||
|
|
||||||
import sshuttle.helpers as helpers
|
import sshuttle.helpers as helpers
|
||||||
import sshuttle.ssnet as ssnet
|
import sshuttle.ssnet as ssnet
|
||||||
@ -650,7 +649,9 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
|
|||||||
# poll() won't tell us when process exited since the
|
# poll() won't tell us when process exited since the
|
||||||
# process is no longer our child (it returns 0 all the
|
# process is no longer our child (it returns 0 all the
|
||||||
# time).
|
# time).
|
||||||
if not psutil.pid_exists(serverproc.pid):
|
try:
|
||||||
|
os.kill(serverproc.pid, 0)
|
||||||
|
except OSError:
|
||||||
raise Fatal('ssh connection to server (pid %d) exited.' %
|
raise Fatal('ssh connection to server (pid %d) exited.' %
|
||||||
serverproc.pid)
|
serverproc.pid)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user