Skip to content

Commit 845921c

Browse files
author
thomas
committed
Fix connection for the status api call. No results in the output.
1 parent 9df2e5e commit 845921c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

netbox/connection.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __request(self, method, params=None, key=None, body=None, url=None):
7171
if response.status_code == 204:
7272
return response.content
7373

74-
if(method == "GET" and ("&export=" in url or "?export=" in url)):
74+
if method == "GET" and ("&export=" in url or "?export=" in url):
7575
# return raw result if export template is specified
7676
return {"results": response.text}
7777

@@ -97,6 +97,9 @@ def get(self, param, key=None, limit=0, **kwargs):
9797

9898
resp_data = self.__request('GET', params=param, key=key, url=url)
9999

100+
if 'status' in param:
101+
return resp_data
102+
100103
return resp_data['results']
101104

102105
def put(self, params):

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def readme():
1414

1515

1616
setup(name='python-netbox',
17-
version='0.0.23',
17+
version='0.0.24',
1818
description='Python NetBox Client',
1919
long_description=readme(),
2020
python_requires='>=3',
2121
author='Thomas van der Jagt',
2222
author_email='[email protected]',
2323
url='https://github.com/jagter/python-netbox',
24-
download_url='https://github.com/jagter/python-netbox/releases/tag/0.0.23.tar.gz',
24+
download_url='https://github.com/jagter/python-netbox/releases/tag/0.0.24.tar.gz',
2525
packages=find_packages(),
2626
install_requires=['ipaddress', 'requests'],
2727
classifiers = [

0 commit comments

Comments
 (0)