Skip to content

Exception because of method push(obj) do not exist on list #29

@tomasy

Description

@tomasy

Version: 0.9 of webthing

2018-11-11 21:50:48,161 web.py:1670 ERROR Uncaught exception GET / (192.168.31.7)
HTTPServerRequest(protocol='http', host='gateway.local:8888', method='GET', uri='/', version='HTTP/1.1', remote_ip='192.168.31.7')
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/tornado/web.py", line 1590, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/webthing/server.py", line 147, in get
    descriptions.push(description)
AttributeError: 'list' object has no attribute 'push'
2018-11-11 21:50:48,175 web.py:2162 ERROR 500 GET / (192.168.31.7) 17.61ms

Solution: Change line 147 in webthing/server.py
from descriptions.push(description) to descriptions.append(description)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions