Skip to content

Commit e769348

Browse files
ianwcboylan
authored andcommitted
Quote devstack_localrc arguments
If you have devstack_localrc: ARGUMENT: "argument with spaces" The quotes get lost during YAML processing and the resulting file has ARGUMENT=argument with spaces which is a shell error. Quote all arguments to avoid this sort of thing. Change-Id: Ia63a53d745dfea7262bcdb5d46425f431c3ccfe5
1 parent 8bdbf85 commit e769348

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

roles/write-devstack-local-conf/library/devstack_local_conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def handle_localrc(self, localrc):
252252
if localrc:
253253
vg = VarGraph(localrc)
254254
for k, v in vg.getVars():
255-
self.localrc.append('{}={}'.format(k, v))
255+
self.localrc.append('{}="{}"'.format(k, v))
256256
if k == 'LIBS_FROM_GIT':
257257
lfg = True
258258
elif k == 'TEMPEST_PLUGINS':

roles/write-devstack-local-conf/library/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_overridelibs_from_git(self):
185185
for line in f:
186186
if line.startswith('LIBS_FROM_GIT'):
187187
lfg = line.strip().split('=')[1]
188-
self.assertEqual('oslo.db', lfg)
188+
self.assertEqual('"oslo.db"', lfg)
189189

190190
def test_plugin_circular_deps(self):
191191
"Test that plugins with circular dependencies fail"
@@ -265,7 +265,7 @@ def test_tempest_plugins_not_overridden(self):
265265
lc.write(p['path'])
266266

267267
tp = self._find_tempest_plugins_value(p['path'])
268-
self.assertEqual('someplugin', tp)
268+
self.assertEqual('"someplugin"', tp)
269269
self.assertEqual(len(lc.warnings), 1)
270270

271271

0 commit comments

Comments
 (0)