Skip to content

Commit

Permalink
remove useless function
Browse files Browse the repository at this point in the history
  • Loading branch information
ogiorgis committed Dec 2, 2024
1 parent 46ff036 commit c4a1623
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions treeherder/intermittents_commenter/commenter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import logging
import re
import time
Expand Down Expand Up @@ -48,7 +47,8 @@ def generate_bug_changes(self, startday, endday, alt_startday, alt_endday):
bug_info = self.fetch_all_bug_details(bug_ids)

all_bug_changes = []
template = Template(self.open_file("comment.template", False))
with open("treeherder/intermittents_commenter/comment.template") as template_file:
template = Template(template_file.read())

if self.weekly_mode:
top_bugs = [
Expand Down Expand Up @@ -178,13 +178,6 @@ def print_or_submit_changes(self, all_bug_changes):
)
)

def open_file(self, filename, load):
with open(f"treeherder/intermittents_commenter/{filename}") as myfile:
if load:
return json.load(myfile)
else:
return myfile.read()

def calculate_date_strings(self, mode, num_days):
"""Returns a tuple of start (in YYYY-MM-DD format) and end date
strings (in YYYY-MM-DD HH:MM:SS format for an inclusive day)."""
Expand Down

0 comments on commit c4a1623

Please sign in to comment.