From 1f8350d2e314e9497fd58c11a125f15b51e98238 Mon Sep 17 00:00:00 2001 Message-Id: <1f8350d2e314e9497fd58c11a125f15b51e98238.1714625990.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 23 May 2014 15:58:24 +0100 Subject: [PATCH] backend.py: Make FlatFileRecord._format include the trailing newline. Organization: Straylight/Edgeware From: Mark Wooding This makes things more convenient for callers, in general. --- backend.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend.py b/backend.py index 8c4d4d1..1967cda 100644 --- a/backend.py +++ b/backend.py @@ -136,7 +136,7 @@ class FlatFileRecord (BasicRecord): raise U.ExpectedError, \ (500, "New `%s' field contains %s" % (k, what)) fields[v] = val - return me._delim.join(fields) + return me._delim.join(fields) + '\n' class FlatFileBackend (object): """ @@ -208,7 +208,6 @@ class FlatFileBackend (object): f_out.write(line) else: f_out.write(rec._format()) - f_out.write('\n') ## Update the permissions on the new file. Don't try to fix the ## ownership (we shouldn't be running as root) or the group (the -- [mdw]