This commit is contained in:
Kovid Goyal 2022-02-27 20:58:18 +05:30
parent 0e2125cda3
commit a3e59697a1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -11,6 +11,7 @@
import tarfile
import tempfile
import time
import traceback
from base64 import standard_b64decode
from contextlib import suppress
from typing import (
@ -124,6 +125,7 @@ def fmt_prefix(msg: Any) -> bytes:
pw = md['pw']
pwfilename = md['pwfile']
except Exception:
traceback.print_exc()
yield fmt_prefix('!invalid ssh data request message')
else:
try:
@ -133,7 +135,6 @@ def fmt_prefix(msg: Any) -> bytes:
if pw != env_data['pw']:
raise ValueError('Incorrect password')
except Exception:
import traceback
traceback.print_exc()
yield fmt_prefix('!incorrect ssh data password')
else:
@ -141,6 +142,7 @@ def fmt_prefix(msg: Any) -> bytes:
try:
data = make_tarfile(resolved_ssh_opts, env_data['env'])
except Exception:
traceback.print_exc()
yield fmt_prefix('!error while gathering ssh data')
else:
from base64 import standard_b64encode