mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-01 12:45:34 +00:00
remote exceptions: simplify sysinfo processing
in the sysinfo function, there is a way to suppress all sysinfo output via an env var and just return an empty string. so we can expect it is always in unpacked, but it might be the empty string.
This commit is contained in:
parent
2331341b74
commit
90c6b7f794
1 changed files with 4 additions and 3 deletions
|
@ -209,6 +209,7 @@ def serve(self):
|
|||
else:
|
||||
logging.debug("\n".join(ex_full))
|
||||
|
||||
sys_info = sysinfo()
|
||||
try:
|
||||
msg = msgpack.packb(
|
||||
{
|
||||
|
@ -218,7 +219,7 @@ def serve(self):
|
|||
"exception_full": ex_full,
|
||||
"exception_short": ex_short,
|
||||
"exception_trace": ex_trace,
|
||||
"sysinfo": sysinfo(),
|
||||
"sysinfo": sys_info,
|
||||
}
|
||||
)
|
||||
except TypeError:
|
||||
|
@ -230,7 +231,7 @@ def serve(self):
|
|||
"exception_full": ex_full,
|
||||
"exception_short": ex_short,
|
||||
"exception_trace": ex_trace,
|
||||
"sysinfo": sysinfo(),
|
||||
"sysinfo": sys_info,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -438,7 +439,7 @@ def exception_full(self):
|
|||
|
||||
@property
|
||||
def sysinfo(self):
|
||||
return self.unpacked.get("sysinfo", "")
|
||||
return self.unpacked["sysinfo"]
|
||||
|
||||
class RPCServerOutdated(Error):
|
||||
"""Borg server is too old for {}. Required version {}"""
|
||||
|
|
Loading…
Reference in a new issue