summaryrefslogtreecommitdiffstats
path: root/bin/crashreportScraper.py
diff options
context:
space:
mode:
authortagezi <lera.goncharuk@gmail.com>2022-05-27 21:25:13 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-02 15:52:20 +0200
commit3cb921dece44e3e289fc73a64399c1a6c618259c (patch)
tree5a18115b4b5e0bca36177995fc0f7301d174fa63 /bin/crashreportScraper.py
parenttdf#148846 TOC: Character fill for tabulation is wrong (diff)
downloadcore-3cb921dece44e3e289fc73a64399c1a6c618259c.tar.gz
core-3cb921dece44e3e289fc73a64399c1a6c618259c.zip
crashreportScraper: Removed time parsing, now it just resets.
Change-Id: I39465cdbc14e28556760a0c1feab22d8998e4d16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135050 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'bin/crashreportScraper.py')
-rwxr-xr-xbin/crashreportScraper.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/bin/crashreportScraper.py b/bin/crashreportScraper.py
index 1735aa3052b5..aec3e5e9cffb 100755
--- a/bin/crashreportScraper.py
+++ b/bin/crashreportScraper.py
@@ -24,15 +24,11 @@ def convert_str_to_date(value):
value = value.replace('June', 'Jun')
value = value.replace('July', 'Jul')
value = value.replace('Sept', 'Sep')
- value = value.replace('noon', '12:00 pm')
+ # reset the time leaving the date
+ value = ", ".join(value.split(", ")[:-1])
+ dtDate = datetime.strptime(value, '%b %d, %Y')
- if ':' not in value:
- if 'am' in value:
- value = value.replace(' am', ':00 am')
- elif 'pm' in value:
- value = value.replace(' pm', ':00 pm')
-
- return datetime.strptime(value, '%b %d, %Y, %H:%M %p')
+ return dtDate.strftime('%y/%m/%d')
def parse_version_url(url):
crashReports = {}
@@ -193,7 +189,7 @@ if __name__ == '__main__':
f.write(line)
f.flush()
- for k, v in crashes.items():
+ for k, lDate in crashes.items():
if len(k) < 254 and k not in crashesInFile and '`' not in k:
print("Parsing " + k)
try:
@@ -201,10 +197,9 @@ if __name__ == '__main__':
"https://crashreport.libreoffice.org/stats/signature/" + k)
crashReason, crashStack, codeLine = parse_details_and_get_info(
"https://crashreport.libreoffice.org/stats/crash_details/" + crashID, gitRepo)
- line = '\t'.join([k, str(crashCount), v[1].strftime('%y/%m/%d'), v[2].strftime('%y/%m/%d'),
+ line = '\t'.join([k, str(crashCount), lDate[1], lDate[2],
crashID, crashVersion, crashReason, crashOS, crashStack, codeLine, '\n'])
f.write(line)
f.flush()
except requests.exceptions.Timeout:
continue
-