diff --git a/daemon.py b/daemon.py index 919fa93..c277e2b 100644 --- a/daemon.py +++ b/daemon.py @@ -18,11 +18,11 @@ if __name__ == "__main__": try: raw = newfile.read_text() encrypted: str = GPG().encrypt(raw, config.server.theirkey, sign=config.server.ourkey) - upfl = BytesIO(encrypted.encode()) + upfl = BytesIO(encrypted.data) uppath = Path(config.server.inpath) / f"{directory.name}_{newfile.name}.pgp" with config.server.get_sftp_client() as sftp: - sftp.putfo(upfl, uppath) + sftp.putfo(upfl, str(uppath)) if directory.sourcebackup: newfile.rename(Path(directory.sourcebackup) / newfile.name)