aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-05-19 11:36:41 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-05-19 11:36:41 +0300
commit04c7e45310c6b13427b8a03913bfaf70a5837762 (patch)
tree7e29c805250bd913663cdf35ade06879ae13005d /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
parent4ba640aa6c007dfaab23c282ec043ac9a85fd048 (diff)
parent231591bb23fc74ffd038c2d58af1c8669e6cf61b (diff)
downloadTango-04c7e45310c6b13427b8a03913bfaf70a5837762.tar.gz
Tango-04c7e45310c6b13427b8a03913bfaf70a5837762.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs23
1 files changed, 15 insertions, 8 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
index 2dfea3ff3..ae77c26d0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
@@ -659,10 +659,11 @@ namespace Tango.PPC.Common.MachineUpdate
{
throw LogManager.Log(new InvalidOperationException("Could not perform an update while the machine is not connected."));
}
- if (!op.CanPrint)
- {
- throw LogManager.Log(new InvalidOperationException($"Could not perform an update while the machine is in {op.Status} status."));
- }
+ }
+
+ if (!op.CanPrint)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not perform an update while the machine is in {op.Status} status."));
}
//Connect to machine service and get matching packages for this machine.
@@ -970,6 +971,11 @@ namespace Tango.PPC.Common.MachineUpdate
{
LogManager.Log("Starting database update...");
+ if (!_machineProvider.MachineOperator.CanPrint)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not perform an update while the machine is in {_machineProvider.MachineOperator} status."));
+ }
+
UpdateProgress("Updating Database", "Initializing...");
LogManager.Log("Looking for update scripts configuration on application path...");
@@ -1241,10 +1247,11 @@ namespace Tango.PPC.Common.MachineUpdate
{
throw LogManager.Log(new InvalidOperationException("Could not perform an update while the machine is not connected."));
}
- if (!op.CanPrint)
- {
- throw LogManager.Log(new InvalidOperationException($"Could not perform an update while the machine is in {op.Status} status."));
- }
+ }
+
+ if (!op.CanPrint)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not perform an update while the machine is in {op.Status} status."));
}
UpdateProgress("Exploring package", "Extracting...");