Skip to content

Commit a57eea6

Browse files
author
AndyEveritt
committed
make model response more consistent across RRF versions
1 parent 2e0569a commit a57eea6

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.1.1
2+
current_version = 1.1.2-b0
33
commit = False
44
tag = False
55
allow_dirty = False

duetwebapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "1.1.1"
1+
__version__ = "1.1.2-b0"
22

33
from .dwa_factory import DuetWebAPI

duetwebapi/api/dsf_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ class DSFAPI(DuetAPI):
1919
def get_model(self, **_ignored) -> Dict:
2020
url = f'{self._base_url}/machine/status'
2121
r = requests.get(url)
22-
j = r.json()
23-
return j
22+
j: Dict = r.json()
23+
result = j['result'] if j.get('result') else j
24+
return result
2425

2526
def send_code(self, code: str) -> Dict:
2627
url = f'{self._base_url}/machine/code'

setup.py

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

1010
setup(
1111
name="duetwebapi",
12-
version="1.1.1",
12+
version="1.1.2-b0",
1313
include_package_data=True,
1414
packages=find_packages(),
1515

0 commit comments

Comments
 (0)