mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-03-30 23:37:05 +00:00
Merge d1c63b6517
into 3efd4257b5
This commit is contained in:
commit
6356990ab6
@ -226,11 +226,13 @@ class EditConf(Grammar):
|
||||
conffile = self[1]
|
||||
options = []
|
||||
eq = "="
|
||||
if self[3] and "-s" in self[3].string: eq = " "
|
||||
for opt in re.split("\s+", self[4].string):
|
||||
k, v = opt.split("=", 1)
|
||||
if self[3] and "-s" in self[3].string: eq = " "
|
||||
try:
|
||||
for opt in re.split("\s+", self[4].string):
|
||||
k, v = opt.split("=", 1) # try except , else err: 1 arg missing
|
||||
v = re.sub(r"\n+", "", fixup_tokens(v)) # not sure why newlines are getting doubled
|
||||
options.append("%s%s%s" % (k, eq, v))
|
||||
except: pass
|
||||
return "<div class='write-to'><div class='filename'>" + self[1].string + " <span>(change settings)</span></div><pre>" + "\n".join(cgi.escape(s) for s in options) + "</pre></div>\n"
|
||||
|
||||
class CaptureOutput(Grammar):
|
||||
|
Loading…
Reference in New Issue
Block a user