Show More
@@ -74,7 +74,8 b' class config(object):' | |||||
74 | sectionre = re.compile(r'\[([^\[]+)\]') |
|
74 | sectionre = re.compile(r'\[([^\[]+)\]') | |
75 | itemre = re.compile(r'([^=\s][^=]*?)\s*=\s*(.*\S|)') |
|
75 | itemre = re.compile(r'([^=\s][^=]*?)\s*=\s*(.*\S|)') | |
76 | contre = re.compile(r'\s+(\S|\S.*\S)\s*$') |
|
76 | contre = re.compile(r'\s+(\S|\S.*\S)\s*$') | |
77 | emptyre = re.compile(r'(;|#|\s*$)') |
|
77 | emptyre = re.compile(r'\s*(;|#|\s*$)') | |
|
78 | commentre = re.compile(r'(;|#)') | |||
78 | unsetre = re.compile(r'%unset\s+(\S+)') |
|
79 | unsetre = re.compile(r'%unset\s+(\S+)') | |
79 | includere = re.compile(r'%include\s+(\S|\S.*\S)\s*$') |
|
80 | includere = re.compile(r'%include\s+(\S|\S.*\S)\s*$') | |
80 | section = "" |
|
81 | section = "" | |
@@ -85,6 +86,8 b' class config(object):' | |||||
85 | for l in data.splitlines(True): |
|
86 | for l in data.splitlines(True): | |
86 | line += 1 |
|
87 | line += 1 | |
87 | if cont: |
|
88 | if cont: | |
|
89 | if commentre.match(l): | |||
|
90 | continue | |||
88 | m = contre.match(l) |
|
91 | m = contre.match(l) | |
89 | if m: |
|
92 | if m: | |
90 | if sections and section not in sections: |
|
93 | if sections and section not in sections: |
General Comments 0
You need to be logged in to leave comments.
Login now