Fix script for release file already present case

This avoids a:
"AttributeError: 'HTTPError' object has no attribute 'message'"

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
This commit is contained in:
Ulysses Souza 2019-03-22 17:10:41 +01:00
parent fc757fb4f5
commit 154d7c1722
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def pypi_upload(args):
'dist/docker-compose-{}*.tar.gz'.format(rel)
])
except HTTPError as e:
if e.response.status_code == 400 and 'File already exists' in e.message:
if e.response.status_code == 400 and 'File already exists' in str(e):
if not args.finalize_resume:
raise ScriptError(
'Package already uploaded on PyPi.'