From 65488ca174b3cddeb6cba1a6eaca19e871bacb50 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 29 Nov 2021 14:19:06 +0100 Subject: [PATCH] [libcalamares] More verbose when loading YAML for Python --- src/libcalamares/PythonJobApi.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 869bda81e..bb2b8749e 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -167,7 +167,14 @@ error( const std::string& s ) boost::python::dict load_yaml( const std::string& path ) { - return variantMapToPyDict( CalamaresUtils::loadYaml( QString::fromStdString( path ) ) ); + const QString filePath = QString::fromStdString( path ); + bool ok = false; + auto map = CalamaresUtils::loadYaml( filePath, &ok ); + if ( !ok ) + { + cWarning() << "Loading YAML from" << filePath << "failed."; + } + return variantMapToPyDict( map ); }