Browse Source

reorg code slightly, make it easier to update constant, also flip this

around as addkeys should be smaller than attrs...
main
John-Mark Gurney 4 years ago
parent
commit
e3934d66fe
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      bitelab/__init__.py

+ 2
- 1
bitelab/__init__.py View File

@@ -388,7 +388,8 @@ async def release_board(board_id, user: str = Depends(lookup_user),
) )


env = os.environ.copy() env = os.environ.copy()
env.update({ k: v for k, v in brd.attrs.items() if k in { 'iface', 'ip', 'devfsrule' } })
addkeys = { 'iface', 'ip', 'devfsrule' }
env.update((k, brd.attrs[k]) for k in addkeys if k in brd.attrs)


sub = await asyncio.create_subprocess_exec( sub = await asyncio.create_subprocess_exec(
settings.setup_script, 'release', brd.name, user, env=env, settings.setup_script, 'release', brd.name, user, env=env,


Loading…
Cancel
Save