[Asterisk-code-review] astconfigparser: Handle case where line is simply a comment. (testsuite[master])
Joshua Colp
asteriskteam at digium.com
Fri Jul 29 04:47:39 CDT 2016
Joshua Colp has uploaded a new change for review.
https://gerrit.asterisk.org/3372
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(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/72/3372/1
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: newchange
Gerrit-Change-Id: I32ffcf693ce491d4fb5e01c6f0c90153ed88a9d4
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list