Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace psutil with os #656

Merged
merged 1 commit into from Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -63,7 +63,6 @@ def version_scheme(version):
},
python_requires='>=3.6',
install_requires=[
'psutil',
],
tests_require=[
'pytest',
Expand Down
5 changes: 3 additions & 2 deletions sshuttle/client.py
Expand Up @@ -6,7 +6,6 @@
import os
import sys
import platform
import psutil

import sshuttle.helpers as helpers
import sshuttle.ssnet as ssnet
Expand Down Expand Up @@ -650,7 +649,9 @@ def check_ssh_alive():
# poll() won't tell us when process exited since the
# process is no longer our child (it returns 0 all the
# 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.' %
serverproc.pid)
else:
Expand Down