From: Torsten Werner Date: Tue, 22 Mar 2011 14:54:11 +0000 (+0000) Subject: Contents: ignore errors when removing destination file. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=783e9564f8747a8939404746d13a6ba9318e17d7;p=dak.git Contents: ignore errors when removing destination file. Signed-off-by: Torsten Werner --- diff --git a/daklib/contents.py b/daklib/contents.py index 99d852b3..848976d5 100755 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -191,7 +191,10 @@ select bc.file, string_agg(o.section || '/' || b.package, ',' order by b.package gzip.stdin.close() output_file.close() gzip.wait() - os.remove(final_filename) + try: + os.remove(final_filename) + except: + pass os.rename(temp_filename, final_filename) os.chmod(final_filename, 0664)