mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 10:06:17 +01:00
- edit_message: restore old filename suffix
Due to the refactoring in commit bb75ce34fd
the suffix defaulted to '.txt'.
This commit is contained in:
parent
6a4423ff62
commit
165d2385da
@ -3838,12 +3838,12 @@ def edit_message(footer='', template='', templatelen=30):
|
|||||||
if lines[templatelen:]:
|
if lines[templatelen:]:
|
||||||
footer = '%s\n\n%s' % ('\n'.join(lines[templatelen:]), footer)
|
footer = '%s\n\n%s' % ('\n'.join(lines[templatelen:]), footer)
|
||||||
data += '\n' + delim + '\n' + footer
|
data += '\n' + delim + '\n' + footer
|
||||||
edit_text(data, delim)
|
edit_text(data, delim, suffix='.diff')
|
||||||
|
|
||||||
def edit_text(data='', delim=None):
|
def edit_text(data='', delim=None, suffix='.txt'):
|
||||||
import tempfile
|
import tempfile
|
||||||
try:
|
try:
|
||||||
(fd, filename) = tempfile.mkstemp(prefix='osc-editor', suffix='.txt')
|
(fd, filename) = tempfile.mkstemp(prefix='osc-editor', suffix=suffix)
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
mtime = os.stat(filename).st_mtime
|
mtime = os.stat(filename).st_mtime
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user