The diskimage_builder.block_device.utils
Module¶
-
diskimage_builder.block_device.utils.
exec_sudo
(cmd)¶ Run a command under sudo
Run command under sudo, with debug trace of output. This is like subprocess.check_call() but sudo wrapped and with output tracing at debug levels.
Arguments: :param cmd: str command list; for Popen() :return: nothing :raises: subprocess.CalledProcessError if return code != 0
-
diskimage_builder.block_device.utils.
parse_abs_size_spec
(size_spec)¶
-
diskimage_builder.block_device.utils.
parse_rel_size_spec
(size_spec, abs_size)¶ Parses size specifications - can be relative like 50%
In addition to the absolute parsing also a relative parsing is done. If the size specification ends in ‘%’, then the relative size of the given ‘abs_size’ is returned.