diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-11-26 12:20:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-11-26 12:20:18 +0100 |
| commit | f87a458bdaa427179ccf241c97c306acc18fb180 (patch) | |
| tree | 80387e0e856e8f8c02afa2fe2f999338ee199521 | |
| parent | 3852c23093f892f348eba8da6bbb6b0a648a8ae4 (diff) | |
Make sure that debian/files is closed after writing it.
| -rw-r--r-- | cscript | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -749,10 +749,10 @@ def package_debian(target, cpu, version, options): # Get the required capability to write to disks print('setcap "cap_dac_override+ep cap_sys_admin+ep" /usr/bin/dcpomatic2_disk_writer', file=f) target.command('./waf dist') - f = open('debian/files', 'w') - suffix = '' if options['gui'] else '-cli' - arch = 'amd64' if cpu == 'x86' else 'aarch64' if cpu == 'arm' else None - print(f'{name}{suffix}_{version}-1_{arch}.deb video extra', file=f) + with open('debian/files', 'w') as f: + suffix = '' if options['gui'] else '-cli' + arch = 'amd64' if cpu == 'x86' else 'aarch64' if cpu == 'arm' else None + print(f'{name}{suffix}_{version}-1_{arch}.deb video extra', file=f) shutil.rmtree('build/deb', ignore_errors=True) os.makedirs('build/deb') |
