Fix Null Reference exception in Windows agent PS scripts

This patch will be going to solve if a output of the powershell script
returns null.
Also change the version of the agent.

Change-Id: I1927deab198283dcbebe00a03db693c41893295d
Closes-bug: #1627851
This commit is contained in:
Jose Phillips 2016-09-26 17:16:39 -05:00
parent 3cfdbe8fc9
commit 945e643d5c
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ namespace Mirantis.Murano.WindowsAgent
{
currentResults.Add(new ExecutionResult {
IsException = false,
Result = result.Select(SerializePsObject).Where(obj => obj != null).ToList()
Result = result.Where(obj => obj != null).Select(SerializePsObject).ToList()
});
}
}

View File

@ -30,7 +30,7 @@ namespace Mirantis.Murano.WindowsAgent
{
base.OnStart(args);
Log.Info("Version 0.5.3");
Log.Info("Version 0.5.4");
this.rabbitMqClient = new RabbitMqClient();