Skip to content

Commit 854e3a5

Browse files
authored
Merge pull request #53 from LuqueDaniel/pybooru-4.2.2
Pybooru 4.2.2
2 parents 12953df + b332aa4 commit 854e3a5

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

9-
- Version: **4.2.0**
9+
- Version: **4.2.2**
1010
- Licensed under: **MIT License**
1111

1212
## Dependencies

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Pybooru - Changelog
22

3+
## Pybooru 4.2.2 - (2020-10-17)
4+
5+
- Added 504 error to HTTP_STATUS_CODE [#52](https://github.com/LuqueDaniel/pybooru/pull/52) by [@chlorofomduck](https://github.com/chlorofomduck)
6+
- Fixed Danbooru client.favorite_remove() [#51](https://github.com/LuqueDaniel/pybooru/issues/51) and all 204 responses.
7+
38
## Pybooru 4.2.0 - (2020-06-06)
49

510
**Note**: Pybooru 4.2.0 Is the last version that support Python 2.7

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Welcome to Pybooru's documentation!
88

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

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

1515
.. Note::
16-
Pybooru 4.2.0 Is the last version that support Python 2.7
16+
Pybooru 4.2.2 Is the last version that support Python 2.7
1717

1818
Dependencies
1919
------------

pybooru/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
resources -- Contains all resources for Pybooru.
1818
"""
1919

20-
__version__ = "4.2.0"
20+
__version__ = "4.2.2"
2121
__license__ = "MIT"
2222
__source_url__ = "https://github.com/LuqueDaniel/pybooru"
2323
__author__ = "Daniel Luque <danielluque14[at]gmail[dot]com>"

pybooru/pybooru.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ def _request(self, url, api_call, request_args, method='GET'):
175175
'headers': response.headers
176176
})
177177

178-
if response.status_code in (200, 201, 202, 204):
178+
if response.status_code in (200, 201, 202):
179179
return response.json()
180+
elif response.status_code == 204:
181+
return True
180182
raise PybooruHTTPError("In _request", response.status_code,
181183
response.url)
182184
except requests.exceptions.Timeout:

0 commit comments

Comments
 (0)