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:
parent
db8aa7f5bf
commit
57f652a3aa
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user