Skip to content

Fixed missing import of time #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mahadi
Copy link

@mahadi mahadi commented Apr 15, 2018

When removing a sensor from the bus, reading it would result in an import error in _update_sensor_data:

Traceback (most recent call last):
  File "ow_monitor.py", line 18, in <module>
    main()
  File "ow_monitor.py", line 13, in main
    t = ds.temperature()
  File "/usr/local/lib/python3.5/dist-packages/sensor/DS18B20.py", line 40, in temperature
    self._update()
  File "/usr/local/lib/python3.5/dist-packages/sensor/__init__.py", line 103, in _update
    self._update_callback(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/sensor/__init__.py", line 63, in locked
    func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/sensor/DS18B20.py", line 52, in _update_sensor_data
    time.sleep(0.2)
NameError: name 'time' is not defined

fixed missing import of time
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant