X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fcontents.py;h=2a29b2e55b5080eadc574e559edf38a22ae1615a;hb=173f39f0ab7af8b592704189f8ecc4a4aa3df889;hp=8c064226273be24d7e61c9b6831ade590bd6aadb;hpb=3f98886cf4658f5634019343cae81002c122e890;p=dak.git diff --git a/daklib/contents.py b/daklib/contents.py index 8c064226..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): @@ -430,6 +426,9 @@ def source_scan_helper(source_id): ''' This function runs in a subprocess. ''' - scanner = SourceContentsScanner(source_id) - scanner.scan() + try: + scanner = SourceContentsScanner(source_id) + scanner.scan() + except Exception, e: + print e