From: Joshua Colp Date: Fri, 29 Jul 2016 09:48:32 +0000 (-0300) Subject: astconfigparser: Handle case where line is simply a comment. X-Git-Tag: 13.12.0-rc1~164^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F3373%2F1;p=thirdparty%2Fasterisk.git astconfigparser: Handle case where line is simply a comment. Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5 --- diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py index 46f4fb484b..a6d88c7b75 100644 --- a/contrib/scripts/sip_to_pjsip/astconfigparser.py +++ b/contrib/scripts/sip_to_pjsip/astconfigparser.py @@ -203,6 +203,9 @@ def remove_comment(line, is_comment): 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