diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-15 13:24:21 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-15 13:24:21 -0400 |
commit | 61777edea42f08de76fc2fd99602c988d1fdf604 (patch) | |
tree | 81629795909fb9cd21ab8a9d6dd9f543d99f183f | |
parent | 04f763d18481c244a92db6af55ec5bd8beaaf640 (diff) |
This wants a string, not bytes, apparently
-rw-r--r-- | paramiko/ecdsakey.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index d0259c1f..604152e8 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -146,12 +146,12 @@ class ECDSAKey(PKey): return True def write_private_key_file(self, filename, password=None): - with open(filename, "wb") as f: + with open(filename, "w") as f: self.write_private_key(f, password=password) def write_private_key(self, file_obj, password=None): key = self.signing_key or self.verifying_key - file_obj.write(self._to_pem(key, password=password)) + file_obj.write(self._to_pem(key, password=password).decode()) @staticmethod def generate(curve=ec.SECP256R1(), progress_func=None): |