]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/InstallPkg.py
BaseTools/Upt: Update error message
[mirror_edk2.git] / BaseTools / Source / Python / UPT / InstallPkg.py
index 3084b60bff3f0fb566adbcafc2a68c8d18816d03..0e99d2f01f2651ccc1da9ddd37835782eee9d00f 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Install distribution package.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -556,15 +556,16 @@ def Main(Options = None):
         Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(),\r
             platform) + format_exc())\r
     finally:\r
-        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED)\r
-        if DistFile:\r
-            DistFile.Close()\r
-        if ContentZipFile:\r
-            ContentZipFile.Close()\r
-        if GlobalData.gUNPACK_DIR:\r
-            rmtree(GlobalData.gUNPACK_DIR)\r
-            GlobalData.gUNPACK_DIR = None\r
-        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
+        if ReturnCode != UPT_ALREADY_INSTALLED_ERROR:\r
+            Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED)\r
+            if DistFile:\r
+                DistFile.Close()\r
+            if ContentZipFile:\r
+                ContentZipFile.Close()\r
+            if GlobalData.gUNPACK_DIR:\r
+                rmtree(GlobalData.gUNPACK_DIR)\r
+                GlobalData.gUNPACK_DIR = None\r
+            Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
     return ReturnCode\r