upgrades: Use current release codename when enabling backports

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2020-07-01 11:09:42 -04:00 committed by Sunil Mohan Adapa
parent d758a917e3
commit 92d39c0b6c
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -222,7 +222,8 @@ def _check_and_backports_sources():
if protocol == 'tor+http':
print('Package download over Tor is enabled.')
dist = 'buster'
dist = subprocess.check_output(['lsb_release', '--codename',
'--short']).decode().strip()
if not _is_release_file_available(protocol, dist):
print(f'Release file for {dist}-backports is not available yet.')
return