mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-23 02:27:05 +00:00
fix err: 1 arg missing corner case
This commit is contained in:
parent
09d1feab80
commit
d1c63b6517
@ -225,11 +225,13 @@ class EditConf(Grammar):
|
|||||||
conffile = self[1]
|
conffile = self[1]
|
||||||
options = []
|
options = []
|
||||||
eq = "="
|
eq = "="
|
||||||
if self[3] and "-s" in self[3].string: eq = " " ## try except # else err
|
if self[3] and "-s" in self[3].string: eq = " "
|
||||||
for opt in re.split("\s+", self[4].string):
|
try:
|
||||||
k, v = opt.split("=", 1)
|
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
|
v = re.sub(r"\n+", "", fixup_tokens(v)) # not sure why newlines are getting doubled
|
||||||
options.append("%s%s%s" % (k, eq, v))
|
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"
|
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):
|
class CaptureOutput(Grammar):
|
||||||
|
Loading…
Reference in New Issue
Block a user