Added debug( str ) to the Python API.

This commit is contained in:
Teo Mrnjavac 2014-07-28 18:55:01 +02:00
parent d30b6300ab
commit 845ae05f7e
3 changed files with 13 additions and 0 deletions

View File

@ -42,6 +42,8 @@ BOOST_PYTHON_MODULE( libcalamares )
bp::scope().attr( "version" ) = CALAMARES_VERSION;
bp::scope().attr( "shortVersion" ) = CALAMARES_VERSION_SHORT;
bp::def( "debug", &CalamaresPython::debug );
bp::class_< CalamaresPython::PythonJobInterface >( "Job", bp::init< Calamares::PythonJob* >() )
.def_readonly( "prettyName", &CalamaresPython::PythonJobInterface::prettyName )
.def_readonly( "workingPath", &CalamaresPython::PythonJobInterface::workingPath )

View File

@ -19,10 +19,19 @@
#include "PythonJobApi.h"
#include "PythonHelper.h"
#include "utils/Logger.h"
namespace CalamaresPython
{
void
debug( const std::string& s )
{
cDebug() << "[PYTHON JOB]: " << QString::fromStdString( s );
}
PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent )
: m_parent( parent )
{

View File

@ -29,6 +29,8 @@
namespace CalamaresPython
{
void debug( const std::string& s );
class PythonJobInterface
{
public: