diff options
author | khilman <khilman@users.noreply.github.com> | 2019-01-08 14:17:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 14:17:29 -0800 |
commit | 09fa2c74e0726a850b32ac0802aa992a7dd5eedb (patch) | |
tree | 950ebd7143d369bd57fcff8bf056d999e3b59184 | |
parent | 01409708b92a2acb2f8ff1da8d27054530c078f9 (diff) | |
parent | 8cb9b1ddbadc1f98afcaf6a33aa8a7e7fd4d34be (diff) |
Merge pull request #82 from kernelci/wip/custom_options
lavalab-gen: more flexible custom_options
-rwxr-xr-x | lavalab-gen.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index 1d91f23..312dfd1 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -533,8 +533,12 @@ def main(): deviceinfo.write("DEVICE_GROUP=%s\n" % board["group"]) deviceinfo.close() if "custom_option" in board: - for coption in board["custom_option"]: - device_line += "{%% %s %%}\n" % coption + if type(board["custom_option"]) == list: + for coption in board["custom_option"]: + device_line += "{%% %s %%}\n" % coption + else: + for line in board["custom_option"].splitlines(): + device_line += "{%% %s %%}\n" % line if not os.path.isdir(device_path): os.mkdir(device_path) if not os.path.isdir(devices_path): |