From fb03866bc3e70f3b736cfc6aa1a2759791fcdf47 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 17 Sep 2018 13:48:43 +0300 Subject: Fix: how we write dput config file --- ick2/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ick2/actions.py b/ick2/actions.py index c302eef..c901d6b 100644 --- a/ick2/actions.py +++ b/ick2/actions.py @@ -611,8 +611,9 @@ class DputAction(Action): # pragma: no cover def create_dput_config_file(self, config): fd, filename = tempfile.mkstemp() - os.write(fd, config) os.close(fd) + with open(filename, "w") as f: + f.write(config) return filename def get_dput_config(self, apt_server): -- cgit v1.2.1