Skip to content

Commit 2a53dc0

Browse files
committed
Fix yet another issue with demarcation line
1 parent 76546fb commit 2a53dc0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Pckgd/Pckgd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def set_header(body, key, value, type_id):
203203
new_lines.append(line)
204204
elif Pckgd.do_not_edit_demarcation in line:
205205
demarc_found = True # once we hit the demarcation, stop looking for headers
206+
new_lines.append(line)
206207
else:
207208
new_lines.append(line)
208209

@@ -336,7 +337,7 @@ def do_update(self, new_pckg):
336337
preamble = self.body.split(Pckgd.do_not_edit_demarcation, 1)[0]
337338

338339
# Assemble new body with old preamble.
339-
if preamble is not None and Pckgd.do_not_edit_demarcation in new_pckg.body and self.headers['Editable'] == True:
340+
if preamble is not None and Pckgd.do_not_edit_demarcation in new_pckg.body and new_pckg.headers['Editable'] == True:
340341
new_body = new_pckg.body.split(Pckgd.do_not_edit_demarcation, 1)[-1].strip()
341342

342343
if preamble is not None:

0 commit comments

Comments
 (0)