From 922bd52cf4fc88bdb802ff7f3f26beeca1f171c5 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sun, 16 Sep 2012 18:35:54 +0200 Subject: [PATCH] daklib/utils.py: lookup gid for group. --- daklib/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daklib/utils.py b/daklib/utils.py index 8a160356..03cd5894 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -27,6 +27,7 @@ import datetime import email.Header import os import pwd +import grp import select import socket import shutil @@ -1468,7 +1469,8 @@ def temp_filename(directory=None, prefix="dak", suffix="", mode=None, group=None if mode: os.chmod(tfname, mode) if group: - os.chown(tfname, -1, group) + gid = grp.getgrnam(group).gr_gid + os.chown(tfname, -1, gid) return (tfd, tfname) ################################################################################ -- 2.39.5