mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-06 16:07:22 +01:00
Fixed W293 (blank-line-with-whitespace): Blank line contains whitespace
This commit is contained in:
committed by
Joshua Tauberer
parent
555ecc1ebb
commit
6bfd1e5140
@@ -110,30 +110,30 @@ while len(input_lines) > 0:
|
||||
buf += line
|
||||
found.add(i)
|
||||
break
|
||||
|
||||
|
||||
# comment-out the existing line (also comment any folded lines)
|
||||
if is_comment is None:
|
||||
buf += comment_char + line.rstrip().replace("\n", "\n" + comment_char) + "\n"
|
||||
else:
|
||||
# the line is already commented, pass it through
|
||||
buf += line
|
||||
|
||||
|
||||
# if this option already is set don't add the setting again,
|
||||
# or if we're clearing the setting with -e, don't add it
|
||||
if (i in found) or (not val and erase_setting):
|
||||
break
|
||||
|
||||
|
||||
# add the new setting
|
||||
buf += indent + name + delimiter + val + "\n"
|
||||
|
||||
|
||||
# note that we've applied this option
|
||||
found.add(i)
|
||||
|
||||
|
||||
break
|
||||
else:
|
||||
# If did not match any setting names, pass this line through.
|
||||
buf += line
|
||||
|
||||
|
||||
# Put any settings we didn't see at the end of the file,
|
||||
# except settings being cleared.
|
||||
for i in range(len(settings)):
|
||||
|
||||
Reference in New Issue
Block a user