Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/reports_mailer.py
diff options
context:
space:
mode:
Diffstat (limited to 'reports_mailer.py')
-rwxr-xr-xreports_mailer.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/reports_mailer.py b/reports_mailer.py
index 8b61840..55c443a 100755
--- a/reports_mailer.py
+++ b/reports_mailer.py
@@ -41,7 +41,8 @@ CUSTOM_SUBJECT = '[custom.feedback.report]'
UNKNOWN_SUBJECT = '???'
CUSTOM_BODY = '''
-Reported: %s
+Report: %s
+Received: %s
Nickname: %s
Serial number: %s
Jabber server: %s
@@ -52,7 +53,8 @@ Message:
'''
AUTOMATIC_BODY = '''
-Reported: %s
+Report: %s
+Received: %s
Component: %s
Type: %s
Ocurrences: %s
@@ -96,11 +98,12 @@ def prepare_message(subject, body, report_path):
return message
-def generate_body(info, report_info_path):
+def generate_body(info, report_info_path, report_name):
report_time = time.ctime(os.path.getctime(report_info_path))
if 'serial_number' in info:
body = CUSTOM_BODY % (
+ report_name,
report_time,
info.get('nick', ''),
info.get('serial_number', ''),
@@ -112,6 +115,7 @@ def generate_body(info, report_info_path):
for bugtype in info[component]:
ocurrences = info[component][bugtype]
body += AUTOMATIC_BODY % (
+ report_name,
report_time,
component,
bugtype,
@@ -153,7 +157,7 @@ def check_reports():
logging.info('Empty report %s.' % report_info_path)
continue
- body = generate_body(report_info, report_info_path)
+ body = generate_body(report_info, report_info_path, report)
subject = generate_subject(report_info)
message = prepare_message(subject, body, report_path)