Adding missing new line

specfile module for post section is missing new line
code after each line, resulting on one line from all
the lines written. This change adds a \n to each line
before writting to specfile.
This commit is contained in:
Alex Jaramillo
2017-06-01 13:02:50 +00:00
parent 9d41cdef8a
commit cd23220c35
+1 -1
View File
@@ -290,11 +290,11 @@ class Specfile(object):
for pkg in sorted(self.packages):
if pkg in ["ignore", "main", "locales"]:
continue
for script in ["post", "pre"]:
content = config.read_conf_file("{}.{}".format(script, pkg))
if content:
self._write("\n%{0} {1}\n".format(script, pkg))
content = ['{}\n'.format(l) for l in content]
self.specfile.writelines(content)
def write_files(self):