[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 6.0-27-g3f2bbab
Sandro Tosi
morph at debian.org
Thu Aug 25 21:45:51 UTC 2011
The following commit has been merged in the master branch:
commit 3f2bbab1612c91b077866b7218ef0dacf3e5d378
Author: Sandro Tosi <morph at debian.org>
Date: Thu Aug 25 23:45:37 2011 +0200
if can't write to the selected output file, then don't crash but just select a temporary file instead; thanks to David A. Parker for the report; Closes: #617636
diff --git a/debian/changelog b/debian/changelog
index 10b6845..c263a48 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,8 +19,11 @@ reportbug (6.2) UNRELEASED; urgency=low
* reportbug/submit.py
- don't force the Envelope-From header to the From value; thanks to
Francesco Poli for the report; Closes: #614880
+ - if can't write to the selected output file, then don't crash but just
+ select a temporary file instead; thanks to David A. Parker for the report;
+ Closes: #617636
- -- Sandro Tosi <morph at debian.org> Thu, 25 Aug 2011 21:59:49 +0200
+ -- Sandro Tosi <morph at debian.org> Thu, 25 Aug 2011 23:44:22 +0200
reportbug (6.1) unstable; urgency=low
diff --git a/reportbug/submit.py b/reportbug/submit.py
index 88e232c..c44ba94 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -322,12 +322,14 @@ def send_report(body, attachments, mua, fromaddr, sendto, ccaddr, bccaddr,
try:
pipe = open_write_safe(msgname, 'w')
except OSError:
+ # we can't write to the selected file, use a temp file instead
fh, newmsgname = TempFile(prefix=tfprefix, dir=draftpath)
- fh.write(message.as_string())
- fh.close()
ewrite('Writing to %s failed; '
- 'wrote bug report to %s\n', msgname, newmsgname)
+ 'using instead %s\n', msgname, newmsgname)
msgname = newmsgname
+ # we just need a place where to write() and a file handler
+ # is here just for that
+ pipe = fh
elif mta and not smtphost:
try:
x = os.getcwd()
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list