Skip to content

Commit

Permalink
python: sd_nspawn: Sort configuration values
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Dec 27, 2024
1 parent bb152ae commit 9812081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/scripts/sd_nspawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _gen_cfg_str(self):
parts.append(f"{subkey}={' '.join(subval)}")
# All other list configurations should be joined with the key
else:
parts += [f"{subkey}={item}" for item in subval]
parts += [f"{subkey}={item}" for item in sorted(subval)]
elif subval:
parts.append(f"{subkey}={subval}")
parts.append('')
Expand Down Expand Up @@ -183,7 +183,7 @@ def _gen_eph_cmd(self):
if flag == '--system-call-filter':
nspawn_cmd.append(f"{flag}={' '.join(value)}")
else:
nspawn_cmd += [f"{flag}={item}" for item in value]
nspawn_cmd += [f"{flag}={item}" for item in sorted(value)]
# certain configuration options are booleans but the commmand
# line option is just a simple flag
elif flag in ('--boot', ) and value == 'yes':
Expand Down

0 comments on commit 9812081

Please sign in to comment.