EditFile: Don't try and store temporary files in /usr/bin.

This commit is contained in:
Stefano Rivera 2011-11-16 13:57:27 +02:00
parent fc669d8645
commit 26ff36479a
2 changed files with 3 additions and 2 deletions

1
debian/changelog vendored
View File

@ -9,6 +9,7 @@ ubuntu-dev-tools (0.136) UNRELEASED; urgency=low
available (as is the case on Debian).
* mk-sbuild: debootstrap with all components, so that eatmydata can be
installed.
* EditFile: Don't try and store temporary files in /usr/bin.
-- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 15 Nov 2011 16:01:32 -0500

View File

@ -167,8 +167,8 @@ class EditBugReport(EditFile):
re.DOTALL | re.UNICODE)
def __init__(self, subject, body, placeholders=None):
tmpfile = tempfile.NamedTemporaryFile(prefix=sys.argv[0] + '_',
suffix='.txt',
prefix = os.path.basename(sys.argv[0]) + '_'
tmpfile = tempfile.NamedTemporaryFile(prefix=prefix, suffix='.txt',
delete=False)
tmpfile.write((u'Summary (one line):\n%s\n\nDescription:\n%s'
% (subject, body)).encode('utf-8'))