1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #575: only add error messages if they are not empty

This commit is contained in:
Ruben S. Montero 2011-04-15 01:59:07 +02:00
parent db8aa7f5bf
commit 57f652a3aa
3 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ void HookManagerDriver::protocol(
{
oss << "Error executing Hook: " << hook_name << ". " << info;
if ( info[0] != '-' )
if ( !info.empty() && info[0] != '-' )
{
vm->set_template_error_message(os.str());
vmpool->update(vm);

View File

@ -144,7 +144,7 @@ void TransferManagerDriver::protocol(
os.str("");
os << "Error excuting image transfer script";
if (info[0] != '-')
if (!info.empty() && info[0] != '-')
{
os << ": " << info;

View File

@ -243,7 +243,7 @@ static void log_error(VirtualMachine* vm,
os.str("");
os << msg;
if (info[0] != '-')
if (!info.empty() && info[0] != '-')
{
os << ": " << info;
vm->set_template_error_message(os.str());