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 75cd664
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI/CD
name: CI

on:
push:
branches: ['master', 'main', 'dev', 'develop']

pull_request:
branches: ['master', 'main', 'dev', 'develop']

Expand Down
38 changes: 21 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: Upload Python Package to PyPI
name: Upload Python Package

on:
release:
types: [created]

jobs:
publish:
deploy:
name: Publish PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
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 75cd664

Please sign in to comment.