docs,config: aggiorna AGENTS.md, config.example, HOST-SETUP.md, checklist faseA e fix vari orchestrator (workstation, build, job, wait, winrm, test)
This commit is contained in:
@@ -116,11 +116,15 @@ class WinRmTransport:
|
||||
stdout, stderr, returncode = client.execute_ps(script)
|
||||
except Exception as exc:
|
||||
raise TransportConnectError(f"WinRM execute_ps failed: {exc}") from exc
|
||||
# pypsrp returns stderr as a list of PSRP error records in some versions;
|
||||
# normalise to a string.
|
||||
# pypsrp returns stderr as a PSDataStreams object (newer versions) or a
|
||||
# list of error records (older versions); normalise to a plain string.
|
||||
stderr_any: Any = stderr
|
||||
if isinstance(stderr_any, str):
|
||||
stderr_str = stderr_any
|
||||
elif hasattr(stderr_any, "error"):
|
||||
# PSDataStreams — extract .error records.
|
||||
error_records = getattr(stderr_any, "error", None) or []
|
||||
stderr_str = "\n".join(str(e) for e in error_records)
|
||||
else:
|
||||
try:
|
||||
stderr_str = "\n".join(str(s) for s in stderr_any)
|
||||
|
||||
Reference in New Issue
Block a user