Support converting types during upload
Allow the user to specify other, non-raw files and upload them, performing a conversion with qemu-img convert and a temporary block device as a shim (since qemu-img can't use FIFOs). Also ensures that the target volume exists before proceeding. Addresses #68
This commit is contained in:
@ -38,11 +38,12 @@ import daemon_lib.zkhandler as zkhandler
|
||||
#
|
||||
# Run a local OS command via shell
|
||||
#
|
||||
def run_os_command(command_string, background=False, environment=None, timeout=None):
|
||||
def run_os_command(command_string, background=False, environment=None, timeout=None, shell=False):
|
||||
command = shlex.split(command_string)
|
||||
try:
|
||||
command_output = subprocess.run(
|
||||
command,
|
||||
shell=shell,
|
||||
env=environment,
|
||||
timeout=timeout,
|
||||
stdout=subprocess.PIPE,
|
||||
|
Reference in New Issue
Block a user