diff --git a/OleAutomation.py b/OleAutomation.py index 0c0904d..fc2aef1 100644 --- a/OleAutomation.py +++ b/OleAutomation.py @@ -181,7 +181,7 @@ def putFile (self, localFile, remoteFile): ''' logging.info("Copying the local file {0} to {1}".format(localFile, remoteFile)) data = getBinaryDataFromFile(localFile) - dataEncoded = "0x"+data.encode('hex') + dataEncoded = "0x" + data.hex() status = self.writeFileBinary(remoteFile, dataEncoded) if isinstance(status,Exception): logging.info("Impossible to create the remote file {0}".format(remoteFile))