Skip to content

fixup examples #23

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/espatcontrol_aio_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
response.close()
counter = counter + 1
print("OK")
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError, RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue
response = None
Expand Down
2 changes: 1 addition & 1 deletion examples/espatcontrol_cheerlights.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
r = requests.get(DATA_SOURCE)
builtin[0] = (0, 0, 100)
print("Reply is OK!")
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError, RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue
print('-'*40,)
Expand Down
6 changes: 3 additions & 3 deletions examples/espatcontrol_countviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import board
import busio
from digitalio import DigitalInOut
import adafruit_espatcontrol
import adafruit_espatcontrol_requests as requests
from adafruit_espatcontrol import adafruit_espatcontrol
from adafruit_espatcontrol import adafruit_espatcontrol_requests as requests
from adafruit_ht16k33 import segments
import neopixel

Expand Down Expand Up @@ -119,7 +119,7 @@ def chime_light():
print("Retrieving data source...", end='')
r = requests.get(DATA_SOURCE)
print("Reply is OK!")
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError, RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue
#print('-'*40,)
Expand Down
2 changes: 1 addition & 1 deletion examples/espatcontrol_quoteEPD.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def draw_bmp(filename, x, y): # pylint: disable=too-many-locals, too-many-branch
print("Retrieving data source...", end='')
req = requests.get(DATA_SOURCE)
print("Reply is OK!")
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError, RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue

Expand Down
2 changes: 1 addition & 1 deletion examples/espatcontrol_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
print("Pinging 8.8.8.8...", end="")
print(esp.ping("8.8.8.8"))
time.sleep(10)
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError,RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue
2 changes: 1 addition & 1 deletion examples/espatcontrol_webclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
print("Text:", r.text)

time.sleep(60)
except (RuntimeError, adafruit_espatcontrol.OKError) as e:
except (ValueError, RuntimeError, adafruit_espatcontrol.OKError) as e:
print("Failed to get data, retrying\n", e)
continue