Merge pull request #336 from rick-masters/fix-run-as-root
Return process from run_as_root.
This commit is contained in:
commit
1aa0b2103c
|
@ -28,9 +28,8 @@ def run(*args, **kwargs):
|
|||
def run_as_root(*args, **kwargs):
|
||||
"""A helper for run that invokes sudo when unprivileged"""
|
||||
if os.geteuid() != 0:
|
||||
run("sudo", *args, **kwargs)
|
||||
else:
|
||||
run(*args, **kwargs)
|
||||
return run("sudo", *args, **kwargs)
|
||||
return run(*args, **kwargs)
|
||||
|
||||
def create_disk(image, disk_type, fs_type, size):
|
||||
"""Create a disk image, with a filesystem on it"""
|
||||
|
|
Loading…
Reference in New Issue