ogclone-engine/client/shared/scripts/listPrimaryPartitions.py

13 lines
455 B
Python

import sys
import subprocess
def og_list_primary_partitions(args):
try:
result = subprocess.run(['ogListPrimaryPartitions'] + args, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(result.stdout.decode())
except subprocess.CalledProcessError as e:
print(f"Error: {e.stderr.decode()}", file=sys.stderr)
sys.exit(e.returncode)
if __name__ == "__main__":
og_list_primary_partitions(sys.argv[1:])