From 28989cfb6aed1278147476aebb7121f12c45bc7f Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 23 Mar 2011 20:59:45 +0100 Subject: [PATCH] Optimize file rename in dak generate. Signed-off-by: Torsten Werner --- daklib/contents.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/daklib/contents.py b/daklib/contents.py index 69000acf..2a29b2e5 100755 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -190,12 +190,8 @@ select bc.file, string_agg(o.section || '/' || b.package, ',' order by b.package gzip.stdin.close() output_file.close() gzip.wait() - try: - os.remove(final_filename) - except: - pass + os.chmod(temp_filename, 0664) os.rename(temp_filename, final_filename) - os.chmod(final_filename, 0664) @classmethod def log_result(class_, result): -- 2.39.5