Skip to content

Commit c7de41c

Browse files
committed
check ssh client in remote access service
1 parent 3e7b3ab commit c7de41c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pywebio/platform/remote_access.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import time
1313
import shlex
1414
from subprocess import Popen, PIPE
15+
import shutil
1516

1617
logger = logging.getLogger(__name__)
1718

@@ -109,6 +110,9 @@ def start_remote_access_service_(**kwargs):
109110

110111

111112
def start_remote_access_service(**kwargs):
113+
if not shutil.which("ssh"):
114+
return logging.error("No ssh client found, remote access service can't start.")
115+
112116
server = os.environ.get('PYWEBIO_REMOTE_ACCESS', 'app.pywebio.online:1022')
113117
if ':' not in server:
114118
server_port = 22

0 commit comments

Comments
 (0)