diff --git a/FrameworkSystem/Client/BundleDeliveryClient.py b/FrameworkSystem/Client/BundleDeliveryClient.py index 5667199a351..ac974b9a5b3 100644 --- a/FrameworkSystem/Client/BundleDeliveryClient.py +++ b/FrameworkSystem/Client/BundleDeliveryClient.py @@ -43,7 +43,7 @@ def __getHash(self, bundleID, dirToSyncTo): def __setHash(self, bundleID, dirToSyncTo, bdHash): try: fileName = os.path.join(dirToSyncTo, ".dab.%s" % bundleID) - with io.open(fileName, "wb") as fd: + with open(fileName, "wt") as fd: fd.write(bdHash) except Exception as e: self.log.error("Could not save hash after synchronization", "%s: %s" % (fileName, str(e))) @@ -113,7 +113,7 @@ def getCAs(self): # if we can not found the file, we return the directory, where the file should be transferClient = self.__getTransferClient() casFile = os.path.join(os.path.dirname(retVal['Message']), "cas.pem") - with io.open(casFile, "w") as fd: + with open(casFile, "w") as fd: result = transferClient.receiveFile(fd, 'CAs') if not result['OK']: return result @@ -131,7 +131,7 @@ def getCLRs(self): # if we can not found the file, we return the directory, where the file should be transferClient = self.__getTransferClient() casFile = os.path.join(os.path.dirname(retVal['Message']), "crls.pem") - with io.open(casFile, "w") as fd: + with open(casFile, "w") as fd: result = transferClient.receiveFile(fd, 'CRLs') if not result['OK']: return result