5a5d63d41c03e0f384569bd1b18b7c70f1158e69 gperez2 Mon Dec 8 15:16:22 2025 -0800 Code review edits, refs #36815 diff --git src/utils/qa/checkStaticDocsDiff.py src/utils/qa/checkStaticDocsDiff.py index 3500d75e1fe..8311ed64f5d 100755 --- src/utils/qa/checkStaticDocsDiff.py +++ src/utils/qa/checkStaticDocsDiff.py @@ -1,37 +1,20 @@ #!/usr/bin/env python3 -# Program Header -# Name: Gerardo Perez -# Description: A program that reports differences in static HTML docs -# across hgwdev, hgwbeta, and hgw0. -# -# -# checkStaticDocsDiff.py -# -# - import subprocess import argparse -# Run a bash command locally -def bash(cmd): - """Executes a shell command locally and returns output as a list of lines.""" - rawOutput = subprocess.run(cmd, check=True, shell=True, - stdout=subprocess.PIPE, universal_newlines=True) - return rawOutput.stdout.split('\n')[0:-1] - # Run a command on a remote host via SSH def get_checksums_via_ssh(host, command): """Executes a checksum command on a remote host via SSH.""" result = subprocess.run( ["ssh", "qateam@" + host, command], capture_output=True, text=True ) return result.stdout # Parse md5sum output into a dict. Example line: "d41d8cd98f00b204e9800998ecf8427e /path/to/file.html" # Produces: { "/path/to/file.html": "d41d8cd..." } def parse_checksums(output): """Parses md5sum output into a dictionary mapping filename -> checksum.""" checksums = {} for line in output.splitlines():