'parted Mklabel' Raises An Error Through Python Subprocess
I want to format a hard disk via python script using subprocess.Popen. Typing the following command inside a shell worls fine. Just pay attention with this command! parted /dev/sdh
Solution 1:
By adding the -s option to the command as follows(ignore output), parted exits with success.
Popen('parted -s /dev/sdh mklabel gpt', shell=True)
Post a Comment for "'parted Mklabel' Raises An Error Through Python Subprocess"