From 6956808b722ef896fd53cb7793fd2b7949156b64 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 11 2016 13:26:21 +0000 Subject: Ensure we write the files in UTF-8 --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 130adfd..7093975 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -188,7 +188,7 @@ def is_valid_ssh_key(key): if not key: return None with tempfile.TemporaryFile() as f: - f.write(key) + f.write(key.encode('utf-8')) f.seek(0) proc = subprocess.Popen(['/usr/bin/ssh-keygen', '-l', '-f', '/dev/stdin'],