Skip to content

Commit

Permalink
fix locations without normal keys, closes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
peakwinter committed Jan 14, 2017
1 parent a61a2ce commit f22b190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,11 @@ def loads(data, conf=True):
to_eval = line
if re.match(cmt_regex, line):
to_eval = re.match(cmt_regex, line).group(1)
kname, kval = re.match(key_regex, to_eval).group(1, 2)
if "#" not in kname:
k = Key(kname, kval)
lopen[0].add(k)
if re.match(key_regex, to_eval):
kname, kval = re.match(key_regex, to_eval).group(1, 2)
if "#" not in kname:
k = Key(kname, kval)
lopen[0].add(k)
if re.match(r'.*}', line):
closenum = len(re.findall('}', line))
while closenum > 0:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='python-nginx',
version='1.0',
version='1.1',
description='Create and modify nginx serverblock configs in Python',
author='Jacob Cook',
author_email='jacob@peakwinter.net',
Expand Down

0 comments on commit f22b190

Please sign in to comment.