]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Core/FileHook.py
BaseTools/UPT: Porting UPT Tool from Python2 to Python3
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Core / FileHook.py
index 67e86f4f74547424970f8f0b8f5b25b1a79b4fee..247dc4bd348a994dc4e12155955f13f8f00ffaee 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file hooks file and directory creation and removal\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, 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
-# distribution. The full text of the license may be found at \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
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -66,7 +66,7 @@ class RecoverMgr:
         arc = self._tryhook(path)\r
         if arc and os.path.isfile(path):\r
             self._createzip()\r
-            self.zip.write(path, arc.encode('utf_8'))\r
+            self.zip.write(path, arc)\r
             sta = os.stat(path)\r
             oldmode = stat.S_IMODE(sta.st_mode)\r
             self.rlist.append(_PathInfo(_CHMOD, path, oldmode))\r