From c721e53c8988511bcaa220e1ede99ace48a1512e Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 4 Aug 2022 08:57:24 -0500 Subject: [PATCH] Try rendering htm diffs as plain html --- epregressions/diffs/ci_compare_script.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/epregressions/diffs/ci_compare_script.py b/epregressions/diffs/ci_compare_script.py index e40b830..c9f2b21 100644 --- a/epregressions/diffs/ci_compare_script.py +++ b/epregressions/diffs/ci_compare_script.py @@ -265,7 +265,12 @@ def main_function(file_name, base_dir, mod_dir, base_sha, mod_sha, make_public, key.make_public() htmlkey = boto.s3.key.Key(bucket, file_path + ".html") - htmlkey.set_contents_from_string(""" + + if file_path_to_send.endswith('.htm'): + htmlkey.set_contents_from_string(contents) + else: + htmlkey.set_contents_from_string( + """ @@ -280,7 +285,9 @@ def main_function(file_name, base_dir, mod_dir, base_sha, mod_sha, make_public, - """, headers={"Content-Type": "text/html"}) + """, + headers={"Content-Type": "text/html"} + ) if make_public: htmlkey.make_public()