From 0ad8314d0baa52a06ad678e5875f9f8c5b4d9ff9 Mon Sep 17 00:00:00 2001 From: brent s Date: Sun, 3 Nov 2019 01:40:23 -0500 Subject: [PATCH] ... --- aif.xsd | 2 +- aif/disk/block.py | 3 ++- aif/disk/block_fallback.py | 5 +++++ aif/utils.py | 8 +++++++- examples/aif.xml | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/aif.xsd b/aif.xsd index e959ea5..9800c84 100644 --- a/aif.xsd +++ b/aif.xsd @@ -8,7 +8,7 @@ - + diff --git a/aif/disk/block.py b/aif/disk/block.py index 4736de8..935f341 100644 --- a/aif/disk/block.py +++ b/aif/disk/block.py @@ -1,3 +1,4 @@ from . import _common -BlockDev = _common.BlockDev +_BlockDev = _common.BlockDev + diff --git a/aif/disk/block_fallback.py b/aif/disk/block_fallback.py index cf795a2..f6b40b7 100644 --- a/aif/disk/block_fallback.py +++ b/aif/disk/block_fallback.py @@ -220,3 +220,8 @@ class Disk(object): p.is_hiformatted = True self.is_partitioned = True return() + +class Mount(object): + def __init__(self, mount_xml, partobj): + self.xml = mount_xml + pass diff --git a/aif/utils.py b/aif/utils.py index 1ade72e..799f7ad 100644 --- a/aif/utils.py +++ b/aif/utils.py @@ -1,4 +1,10 @@ -import re +import os + +def hasBin(binary_name): + paths = [] + for p in os.environ.get('PATH', '/usr/bin:/bin').split(':'): + os.listdir(os.path.realpath(p)) + def xmlBool(xmlobj): # https://bugs.launchpad.net/lxml/+bug/1850221 diff --git a/examples/aif.xml b/examples/aif.xml index 28162e4..274b8bc 100644 --- a/examples/aif.xml +++ b/examples/aif.xml @@ -185,3 +185,4 @@ +