[Reportbug-commits] [reportbug] 01/01: save a backup of the bug report, that will prevent data loss in case of crash or unexpected errors; Closes: #736214
Sandro Tosi
morph at moszumanska.debian.org
Fri Jan 1 19:36:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit 259fe7bcb8e6108a4646390695c8f300c7c61cca
Author: Sandro Tosi <morph at debian.org>
Date: Fri Jan 1 19:36:53 2016 +0000
save a backup of the bug report, that will prevent data loss in case of crash or unexpected errors; Closes: #736214
---
debian/changelog | 4 +++-
reportbug/submit.py | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 8f7fe81..eea597f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ reportbug (6.6.6) UNRELEASED; urgency=medium
- print the "If you want to provide additional information" text only if an
email is specified in sysinfo, this prevents a crash if we are sending
reports to a non-debbugs instance; Closes: #789332
+ - save a backup of the bug report, that will prevent data loss in case of
+ crash or unexpected errors; Closes: #736214
* debian/control
- add dep on 'file' for python-reportbug; Closes: #803764
* reportbug/ui/text_ui.py
@@ -41,7 +43,7 @@ reportbug (6.6.6) UNRELEASED; urgency=medium
* reportbug/ui/*
- dont crash if we cant access the BTS: Closes: #694634
- -- Sandro Tosi <morph at debian.org> Fri, 01 Jan 2016 18:24:59 +0000
+ -- Sandro Tosi <morph at debian.org> Fri, 01 Jan 2016 19:36:06 +0000
reportbug (6.6.5) unstable; urgency=medium
diff --git a/reportbug/submit.py b/reportbug/submit.py
index 52bc66b..d690f24 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -376,6 +376,12 @@ def send_report(body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
mta, commands.mkarg(envfrom), jalist), 'w')
using_sendmail = True
+ # saving a backup of the report
+ backupfh, backupname = TempFile(prefix=tempfile_prefix(package, 'backup'), dir=draftpath)
+ ewrite('Saving a backup of the report at %s\n', backupname)
+ backupfh.write(message)
+ backupfh.close()
+
if smtphost:
toaddrs = [x[1] for x in alist]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list