diff --git a/fsl/data/image.py b/fsl/data/image.py index 97fe2d72259864a9890f571ea91671e43a56659b..d54c75b045ac70d24950ec33990bc1588e8cc694 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -1002,7 +1002,7 @@ class Image(Nifti): :arg image: A string containing the name of an image file to load, or a :mod:`numpy` array, or a :mod:`nibabel` image - object. + object, or an ``Image``object. :arg name: A name for the image. diff --git a/fsl/utils/run.py b/fsl/utils/run.py index 70915cf2dea6d0adcc68cd733283382c634153d1..caacbf9761bc7c9da7e198449915ee848ce6c04b 100644 --- a/fsl/utils/run.py +++ b/fsl/utils/run.py @@ -180,13 +180,17 @@ def run(*args, **kwargs): returnStderr = kwargs.pop('stderr', False) returnExitcode = kwargs.pop('exitcode', False) submit = kwargs.pop('submit', {}) - log = kwargs.pop('log', {}) - tee = log .get('tee', False) - logStdout = log .get('stdout', None) - logStderr = log .get('stderr', None) - logCmd = log .get('cmd', None) + log = kwargs.pop('log', None) args = prepareArgs(args) + if log is None: + log = {} + + tee = log.get('tee', False) + logStdout = log.get('stdout', None) + logStderr = log.get('stderr', None) + logCmd = log.get('cmd', None) + if not bool(submit): submit = None