Skip to content

Commit

Permalink
chore: fix response
Browse files Browse the repository at this point in the history
  • Loading branch information
Two Dev committed Dec 15, 2024
1 parent 460eea2 commit 9291bf4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
name: Upload Python Package to PyPI
name: Upload Python Package

on:
release:
types: [created]
types: [created, edited]

jobs:
publish:
deploy:
name: Publish PyPI
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install pypa/build
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build a binary wheel
run: >-
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ publish-pypi:
python -m pip install -r requirements-dev.txt
python -m pip install 'twine>=6.0.1'
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload --skip-existing dist/*
rm -rf build dist .egg wrapper_tls_requests.egg-info
2 changes: 1 addition & 1 deletion tls_requests/models/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def from_tls_response(
) -> "Response":
def _parse_response_body(value: Optional[str]) -> bytes:
if value:
if is_byte_response:
if is_byte_response and response.status > 0:
try:
value = b64decode(value.split(",")[-1])
return value
Expand Down

0 comments on commit 9291bf4

Please sign in to comment.