From 5086f92ee3d594e562b53e2441b3786cc496da94 Mon Sep 17 00:00:00 2001 From: Brad Date: Sun, 26 Apr 2026 10:43:54 -0400 Subject: [PATCH] Make subprocess calls Python 3.6 compatible --- ndrift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ndrift b/ndrift index b12a615..440fb35 100755 --- a/ndrift +++ b/ndrift @@ -348,8 +348,9 @@ def get_file_attrs(path: str) -> str: proc = subprocess.run( ["lsattr", "-d", path], check=False, - capture_output=True, - text=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, ) except FileNotFoundError: return "" @@ -871,7 +872,13 @@ def send_s3_report(s3_bucket: str, report_path: str, logger: logging.Logger) -> key_name = f"ndrift-reports/{pathlib.Path(report_path).name}.{int(time.time())}.json" command = ["aws", "s3", "cp", report_path, f"s3://{s3_bucket}/{key_name}"] try: - proc = subprocess.run(command, check=False, capture_output=True, text=True) + proc = subprocess.run( + command, + check=False, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, + ) except FileNotFoundError: logger.error("AWS CLI is missing, cannot upload report") return