From f8078be2fd20c3bad43aa8a1253adcc357e005e9 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 19 Aug 2016 12:47:45 +0200 Subject: [PATCH] Wrap CalamaresUtils::obscure in CalamaresPython. --- src/libcalamares/PythonJobApi.cpp | 8 ++++++++ src/libcalamares/PythonJobApi.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 9203330ec..f71389e2d 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -21,6 +21,7 @@ #include "PythonHelper.h" #include "utils/Logger.h" #include "utils/CalamaresUtilsSystem.h" +#include "utils/CalamaresUtils.h" #include @@ -190,4 +191,11 @@ PythonJobInterface::setprogress( qreal progress ) m_parent->emitProgress( progress ); } + +std::string +obscure( const std::string& string ) +{ + return CalamaresUtils::obscure( QString::fromStdString( string ) ).toStdString(); +} + } diff --git a/src/libcalamares/PythonJobApi.h b/src/libcalamares/PythonJobApi.h index c3649ab29..8464db79d 100644 --- a/src/libcalamares/PythonJobApi.h +++ b/src/libcalamares/PythonJobApi.h @@ -58,6 +58,7 @@ std::string check_target_env_output( const boost::python::list& args, const std::string& stdin = std::string(), int timeout = 0 ); +std::string obscure( const std::string& string ); inline int _handle_check_target_env_call_error( int ec, const QString& cmd );