summaryrefslogtreecommitdiff
path: root/paramiko/ecdsakey.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-03-15 13:24:21 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-03-15 13:24:21 -0400
commit61777edea42f08de76fc2fd99602c988d1fdf604 (patch)
tree81629795909fb9cd21ab8a9d6dd9f543d99f183f /paramiko/ecdsakey.py
parent04f763d18481c244a92db6af55ec5bd8beaaf640 (diff)
downloadparamiko-61777edea42f08de76fc2fd99602c988d1fdf604.tar.gz
This wants a string, not bytes, apparently
Diffstat (limited to 'paramiko/ecdsakey.py')
-rw-r--r--paramiko/ecdsakey.py4
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):