Skip to content

Commit

Permalink
Merge pull request #53 from LuqueDaniel/pybooru-4.2.2
Browse files Browse the repository at this point in the history
Pybooru 4.2.2
  • Loading branch information
LuqueDaniel authored Oct 17, 2020
2 parents 12953df + b332aa4 commit 854e3a5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

**Pybooru** is a Python package to access to the API of Danbooru/Moebooru based sites.

- Version: **4.2.0**
- Version: **4.2.2**
- Licensed under: **MIT License**

## Dependencies
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Pybooru - Changelog

## Pybooru 4.2.2 - (2020-10-17)

- Added 504 error to HTTP_STATUS_CODE [#52](https://github.com/LuqueDaniel/pybooru/pull/52) by [@chlorofomduck](https://github.com/chlorofomduck)
- Fixed Danbooru client.favorite_remove() [#51](https://github.com/LuqueDaniel/pybooru/issues/51) and all 204 responses.

## Pybooru 4.2.0 - (2020-06-06)

**Note**: Pybooru 4.2.0 Is the last version that support Python 2.7
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Welcome to Pybooru's documentation!

**Pybooru** is a Python package to access to the API of Danbooru/Moebooru based sites.

- Version: **4.2.0**
- Version: **4.2.2**
- Licensed under: `MIT License <https://github.com/LuqueDaniel/pybooru/blob/master/LICENSE>`_
- Python: >= 2.7 or Python: >= 3.3

.. Note::
Pybooru 4.2.0 Is the last version that support Python 2.7
Pybooru 4.2.2 Is the last version that support Python 2.7

Dependencies
------------
Expand Down
2 changes: 1 addition & 1 deletion pybooru/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
resources -- Contains all resources for Pybooru.
"""

__version__ = "4.2.0"
__version__ = "4.2.2"
__license__ = "MIT"
__source_url__ = "https://github.com/LuqueDaniel/pybooru"
__author__ = "Daniel Luque <danielluque14[at]gmail[dot]com>"
Expand Down
4 changes: 3 additions & 1 deletion pybooru/pybooru.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ def _request(self, url, api_call, request_args, method='GET'):
'headers': response.headers
})

if response.status_code in (200, 201, 202, 204):
if response.status_code in (200, 201, 202):
return response.json()
elif response.status_code == 204:
return True
raise PybooruHTTPError("In _request", response.status_code,
response.url)
except requests.exceptions.Timeout:
Expand Down

0 comments on commit 854e3a5

Please sign in to comment.