Cleanup PiscalSshClient ending newlines
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
@@ -19,7 +18,7 @@ namespace LeafWeb.Core.Remote
|
||||
private const string StatusRunning = "running";
|
||||
private const string StatusNotStarted = "not started";
|
||||
|
||||
Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public PiscalSshClient(string connectionString)
|
||||
{
|
||||
@@ -81,9 +80,9 @@ namespace LeafWeb.Core.Remote
|
||||
ssh.Disconnect();
|
||||
|
||||
if (command.ExitStatus != 0)
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Result);
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Result.TrimEndNewLine());
|
||||
|
||||
_logger.Debug("RunLeafInput result: " + command.Result);
|
||||
_logger.Debug("RunLeafInput result: " + command.Result.TrimEndNewLine());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ namespace LeafWeb.Core.Remote
|
||||
ssh.Disconnect();
|
||||
|
||||
if (command.ExitStatus != 0)
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Result);
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Result.TrimEndNewLine());
|
||||
|
||||
return command.Result
|
||||
.SplitNewLine()
|
||||
@@ -169,7 +168,7 @@ namespace LeafWeb.Core.Remote
|
||||
ssh.Disconnect();
|
||||
|
||||
if (command.ExitStatus != 0)
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Error);
|
||||
throw new PiscalClientException(leafInput.LeafInputId, command.Error.TrimEndNewLine());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user