scripts: accept absolute paths to YAML
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I94044f096db64e6152bf4e7cd3bff7159e1cc85a
diff --git a/scripts/extra-properties.py b/scripts/extra-properties.py
index 115abf7..465f95c 100755
--- a/scripts/extra-properties.py
+++ b/scripts/extra-properties.py
@@ -21,7 +21,7 @@
)
args = parser.parse_args()
- with open(os.path.join(script_dir, args.extra_props_yaml), "r") as fd:
+ with open(args.extra_props_yaml, "r") as fd:
yamlDict = yaml.safe_load(fd)
# Render the mako template
diff --git a/scripts/fru_gen.py b/scripts/fru_gen.py
index 624d052..06208df 100755
--- a/scripts/fru_gen.py
+++ b/scripts/fru_gen.py
@@ -9,7 +9,7 @@
def generate_cpp(inventory_yaml, output_dir):
- with open(os.path.join(script_dir, inventory_yaml), "r") as f:
+ with open(inventory_yaml, "r") as f:
ifile = yaml.safe_load(f)
if not isinstance(ifile, dict):
ifile = {}
@@ -55,7 +55,7 @@
args = parser.parse_args()
- if not (os.path.isfile(os.path.join(script_dir, args.inventory_yaml))):
+ if not (os.path.isfile(args.inventory_yaml)):
sys.exit("Can not find input yaml file " + args.inventory_yaml)
function = valid_commands[args.command]