From b77d8b1f210519c5361d5475d190941d9ac8dc11 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 12 Sep 2023 10:45:15 -0400 Subject: [PATCH] Make yaml import conditional Only Ubuntu requires it, but tends to have it. Other distributions do not tend to have it. --- imgutil/imgutil | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index 8f805ac5..4e46ce0f 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -23,7 +23,10 @@ import subprocess import sys import tempfile import time -import yaml +try: + import yaml +except ImportError: + pass path = os.path.dirname(os.path.realpath(__file__)) path = os.path.realpath(os.path.join(path, '..', 'lib', 'python')) if path.startswith('/opt'):