Wrap CalamaresUtils::obscure in CalamaresPython.

This commit is contained in:
Teo Mrnjavac 2016-08-19 12:47:45 +02:00
parent aef1670891
commit f8078be2fd
2 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "PythonHelper.h" #include "PythonHelper.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/CalamaresUtilsSystem.h" #include "utils/CalamaresUtilsSystem.h"
#include "utils/CalamaresUtils.h"
#include <QDir> #include <QDir>
@ -190,4 +191,11 @@ PythonJobInterface::setprogress( qreal progress )
m_parent->emitProgress( progress ); m_parent->emitProgress( progress );
} }
std::string
obscure( const std::string& string )
{
return CalamaresUtils::obscure( QString::fromStdString( string ) ).toStdString();
}
} }

View File

@ -58,6 +58,7 @@ std::string check_target_env_output( const boost::python::list& args,
const std::string& stdin = std::string(), const std::string& stdin = std::string(),
int timeout = 0 ); int timeout = 0 );
std::string obscure( const std::string& string );
inline int _handle_check_target_env_call_error( int ec, const QString& cmd ); inline int _handle_check_target_env_call_error( int ec, const QString& cmd );