We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6f2674 commit 6ec5ce8Copy full SHA for 6ec5ce8
netjsonconfig/backends/openwrt/openwrt.py
@@ -26,6 +26,7 @@ class OpenWrt(object):
26
renderers.DefaultRenderer
27
]
28
FILE_SECTION_DELIMITER = '# ---------- files ---------- #'
29
+ PACKAGE_EXP = re.compile('package ')
30
31
def __init__(self, config, templates=[]):
32
"""
@@ -173,7 +174,7 @@ def _generate_contents(self, tar):
173
174
175
uci = self.render(files=False)
176
# create a list with all the packages (and remove empty entries)
- packages = re.split('package ', uci)
177
+ packages = self.PACKAGE_EXP.split(uci)
178
if '' in packages:
179
packages.remove('')
180
# for each package create a file with its contents in /etc/config
0 commit comments