[libcalamares] Give Python jobs a warning()
- Add libcalamares.utils.warning() alongside debug() for Python modules to output warnings.
This commit is contained in:
parent
dbbec4f76d
commit
84d599625f
@ -99,6 +99,13 @@ BOOST_PYTHON_MODULE( libcalamares )
|
|||||||
bp::args( "s" ),
|
bp::args( "s" ),
|
||||||
"Writes the given string to the Calamares debug stream."
|
"Writes the given string to the Calamares debug stream."
|
||||||
);
|
);
|
||||||
|
bp::def(
|
||||||
|
"warning",
|
||||||
|
&CalamaresPython::warning,
|
||||||
|
bp::args( "s" ),
|
||||||
|
"Writes the given string to the Calamares warning stream."
|
||||||
|
);
|
||||||
|
|
||||||
bp::def(
|
bp::def(
|
||||||
"mount",
|
"mount",
|
||||||
&CalamaresPython::mount,
|
&CalamaresPython::mount,
|
||||||
|
@ -171,6 +171,11 @@ debug( const std::string& s )
|
|||||||
cDebug() << "[PYTHON JOB]: " << QString::fromStdString( s );
|
cDebug() << "[PYTHON JOB]: " << QString::fromStdString( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
warning( const std::string& s )
|
||||||
|
{
|
||||||
|
cWarning() << "[PYTHON JOB]: " << QString::fromStdString( s );
|
||||||
|
}
|
||||||
|
|
||||||
PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent )
|
PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent )
|
||||||
: m_parent( parent )
|
: m_parent( parent )
|
||||||
|
@ -66,6 +66,7 @@ boost::python::object gettext_path();
|
|||||||
boost::python::list gettext_languages();
|
boost::python::list gettext_languages();
|
||||||
|
|
||||||
void debug( const std::string& s );
|
void debug( const std::string& s );
|
||||||
|
void warning( const std::string& s );
|
||||||
|
|
||||||
class PythonJobInterface
|
class PythonJobInterface
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user