From: Torsten Werner Date: Wed, 23 Mar 2011 19:59:45 +0000 (+0100) Subject: Optimize file rename in dak generate. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28989cfb6aed1278147476aebb7121f12c45bc7f;p=dak Optimize file rename in dak generate. Signed-off-by: Torsten Werner --- 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):