[Asterisk-code-review] astconfigparser: Handle case where line is simply a comment. (testsuite[master])
Anonymous Coward
asteriskteam at digium.com
Mon Aug 1 11:27:57 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: astconfigparser: Handle case where line is simply a comment.
......................................................................
astconfigparser: Handle case where line is simply a comment.
Change-Id: I32ffcf693ce491d4fb5e01c6f0c90153ed88a9d4
---
M lib/python/asterisk/astconfigparser.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/lib/python/asterisk/astconfigparser.py b/lib/python/asterisk/astconfigparser.py
index 46f4fb4..a6d88c7 100644
--- a/lib/python/asterisk/astconfigparser.py
+++ b/lib/python/asterisk/astconfigparser.py
@@ -203,6 +203,9 @@
if match:
# the end of where the real string is is where the comment starts
line = line[0:(match.end()-1)]
+ elif line.startswith(";"):
+ # if the line is actually a comment just ignore it all
+ line = ""
return line.replace("\\", "").strip(), False
--
To view, visit https://gerrit.asterisk.org/3372
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32ffcf693ce491d4fb5e01c6f0c90153ed88a9d4
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list