Merge pull request #6610 from ulyssessouza/fix-httperror-no-attribute-message

Fix script for the case of release file already present on pypi
This commit is contained in:
Ulysses Souza 2019-03-25 17:18:59 +01:00 committed by GitHub
commit b2723d6b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.'