mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
lib.ExecContext.sudo(): Default None mod_env to {}
mod_env can be None. Make it an empty dict in that case to take a little burden off the implementations in the derived classes. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
21e67291b5
commit
3bda9bc826
1 changed files with 2 additions and 0 deletions
|
|
@ -202,6 +202,8 @@ class ExecContext(abc.ABC):
|
|||
ret = Result(None, None, 1)
|
||||
if opts is None:
|
||||
opts = {}
|
||||
if mod_env is None:
|
||||
mod_env = {}
|
||||
with self.CallContext(self, title=title, cmd=cmd, cmd_input=cmd_input, wd=wd,
|
||||
log_prefix='|', interactive=None, throw=throw, verbose=verbose) as cc:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue