Skip to content

Commit

Permalink
revise statistical tool for the test log of QTT.
Browse files Browse the repository at this point in the history
  • Loading branch information
WFA-lliu committed May 24, 2024
1 parent 0126714 commit 4f9fa4e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion faketrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ def get_dt(ts: str = None) -> datetime:
ts = ts.replace("_", ":")
ts = ts.rstrip("Z")
fmt: str = "%Y-%m-%d %H:%M:%S"
return datetime.strptime(ts, fmt)
dt: datetime = None
try:
dt = datetime.strptime(ts, fmt)
except:
pass
return dt

@staticmethod
def get_ts(dt: datetime = None) -> str:
Expand Down Expand Up @@ -57,6 +62,8 @@ def get_report(dir: list = None) -> tuple:
logging.debug("d: " + os.path.basename(d))
patt: list = os.path.basename(d).split(delimiter)
name = delimiter.join(patt[2:len(patt)-3])
if len(name) == 0:
continue
raw[f].add(name)
ts = delimiter.join(patt[len(patt)-3:])
dt = FakeTrack.get_dt(ts)
Expand Down

0 comments on commit 4f9fa4e

Please sign in to comment.