Skip to content

Commit

Permalink
Merge pull request #34 from colonwq/add_sdcheck
Browse files Browse the repository at this point in the history
Add sd_check function to pyportal
  • Loading branch information
kattni authored Jan 22, 2020
2 parents d14e53a + 212392b commit 7cbb3e8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions adafruit_pyportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,13 @@ def image_converter_url(image_url, width, height, color_depth=16):
return IMAGE_CONVERTER_SERVICE % (aio_username, aio_key,
width, height,
color_depth, image_url)
def sd_check(self):
"""Returns True if there is an SD card preset and False
if there is no SD card. The _sdcard value is set in _init
"""
if self._sdcard:
return True
return False

def push_to_io(self, feed_key, data):
# pylint: disable=line-too-long
Expand Down

0 comments on commit 7cbb3e8

Please sign in to comment.