]> git.decadent.org.uk Git - dak.git/commitdiff
Optimize file rename in dak generate.
authorTorsten Werner <twerner@debian.org>
Wed, 23 Mar 2011 19:59:45 +0000 (20:59 +0100)
committerTorsten Werner <twerner@debian.org>
Wed, 23 Mar 2011 19:59:45 +0000 (20:59 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/contents.py

index 69000acf816c845305e333efb7ae711a97e331af..2a29b2e55b5080eadc574e559edf38a22ae1615a 100755 (executable)
@@ -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):