self._Files = {}\r
for Filename in self._ZipFile.namelist():\r
self._Files[os.path.normpath(Filename)] = Filename\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_OPEN_FAILURE, \r
ExtraData="%s (%s)" % (FileName, str(Xstr)))\r
\r
ExtraData="[%s] in %s" % (Which, self._FileName))\r
try:\r
FileContent = self._ZipFile.read(self._Files[Which])\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_DECOMPRESS_FAILURE, \r
ExtraData="[%s] in %s (%s)" % (Which, \\r
self._FileName, \\r
return\r
else:\r
ToFile = __FileHookOpen__(ToDest, 'wb')\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_OPEN_FAILURE, \r
ExtraData="%s (%s)" % (ToDest, str(Xstr)))\r
\r
try:\r
ToFile.write(FileContent)\r
ToFile.close()\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_WRITE_FAILURE, \r
ExtraData="%s (%s)" % (ToDest, str(Xstr)))\r
\r
return\r
Logger.Info("packing ..." + File)\r
self._ZipFile.write(File, ArcName)\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_COMPRESS_FAILURE,\r
ExtraData="%s (%s)" % (File, str(Xstr)))\r
\r
if os.path.splitext(ArcName)[1].lower() == '.pkg':\r
Data = Data.encode('utf_8')\r
self._ZipFile.writestr(ArcName, Data)\r
- except BaseException, Xstr:\r
+ except BaseException as Xstr:\r
Logger.Error("PackagingTool", FILE_COMPRESS_FAILURE,\r
ExtraData="%s (%s)" % (ArcName, str(Xstr)))\r
\r