]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
astconfigparser: Handle case where line is simply a comment. 73/3373/1
authorJoshua Colp <jcolp@digium.com>
Fri, 29 Jul 2016 09:48:32 +0000 (06:48 -0300)
committerJoshua Colp <jcolp@digium.com>
Fri, 29 Jul 2016 09:48:32 +0000 (06:48 -0300)
Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5

contrib/scripts/sip_to_pjsip/astconfigparser.py

index 46f4fb484b284ddae24410f6587c8c2a117c50a0..a6d88c7b75341aa52e635037b9c8c116e89ad52b 100644 (file)
@@ -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