From: Daniel Martí Date: Mon, 4 Jan 2016 17:44:46 +0000 (+0100) Subject: init: fix writing into file X-Git-Tag: 0.7.0~86^2~23 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a78341d8e594ed67caee8bfa4c125d5b94680e05;p=fdroidserver.git init: fix writing into file --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 00c3e2f6..ee19776a 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -338,9 +338,9 @@ def write_password_file(pwtype, password=None): filename = '.fdroid.' + pwtype + '.txt' fd = os.open(filename, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, 0o600) if password is None: - os.write(fd, config[pwtype]) + os.write(fd, config[pwtype].encode('utf-8')) else: - os.write(fd, password) + os.write(fd, password.encode('utf-8')) os.close(fd) config[pwtype + 'file'] = filename