Skip to content

Commit 448b66b

Browse files
authored
Merge pull request #69 from makermelissa/master
Fix graphics and network when inited directly with no params
2 parents 3f12cd2 + b71ee1a commit 448b66b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

adafruit_matrixportal/graphics.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ def __init__(
5757
self,
5858
**kwargs,
5959
):
60-
default_bg = kwargs.pop("default_bg")
61-
debug = kwargs.pop("debug")
60+
default_bg = 0x000000
61+
debug = False
62+
if "default_bg" in kwargs:
63+
default_bg = kwargs.pop("default_bg")
64+
if "debug" in kwargs:
65+
debug = kwargs.pop("debug")
6266

6367
matrix = Matrix(**kwargs)
6468

adafruit_matrixportal/network.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ class Network(NetworkBase):
5050

5151
def __init__(self, **kwargs):
5252
extract_values = True
53+
debug = False
5354
if "extract_values" in kwargs:
5455
extract_values = kwargs.pop("extract_values")
55-
debug = kwargs.pop("debug")
56+
if "debug" in kwargs:
57+
debug = kwargs.pop("debug")
5658
wifi = WiFi(**kwargs)
5759

5860
super().__init__(

0 commit comments

Comments
 (0)