[Asterisk-code-review] astconfigparser: Handle case where line is simply a comment. (asterisk[13])
Anonymous Coward
asteriskteam at digium.com
Mon Aug 1 15:05:04 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: I2dea5815363f4d787d709228a04f33baee383ef5
---
M contrib/scripts/sip_to_pjsip/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/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py
index 46f4fb4..a6d88c7 100644
--- a/contrib/scripts/sip_to_pjsip/astconfigparser.py
+++ b/contrib/scripts/sip_to_pjsip/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/3373
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
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