Skip to content

Commit 84374d0

Browse files
committed
no longer send wifi credentials in constructor
1 parent b33df30 commit 84374d0

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/gurgleapps_webserver.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020

2121
class GurgleAppsWebserver:
2222

23-
def __init__(self, wifi_ssid, wifi_password, port=80, timeout=20, doc_root="/www", log_level=0):
23+
def __init__(self, port=80, timeout=20, doc_root="/www", log_level=0):
2424
print("GurgleApps.com Webserver")
2525
self.default_index_pages = [] # ["index.html", "index.htm"]
2626
self.ip_address = '1.1.1.1'
2727
self.port = port
2828
self.timeout = timeout
29-
self.wifi_ssid = wifi_ssid
30-
self.wifi_password = wifi_password
29+
self.wifi_ssid = None
30+
self.wifi_password = None
3131
self.ap_ssid = None
3232
self.ap_password = None
3333
self.doc_root = doc_root
@@ -44,11 +44,6 @@ def __init__(self, wifi_ssid, wifi_password, port=80, timeout=20, doc_root="/www
4444
</body>
4545
</html>
4646
"""
47-
if self.wifi_ssid!=None:
48-
if self.connect_wifi(self.wifi_ssid, self.wifi_password):
49-
print('point your browser to http://', self.ip_address)
50-
else:
51-
raise RuntimeError('network connection failed')
5247
self.server_running = False
5348

5449

src/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ async def main():
142142
await asyncio.sleep(0.2)
143143

144144
server = GurgleAppsWebserver(
145-
None,
146-
None,
147145
port=80,
148146
timeout=20,
149147
doc_root="/www",

src/www/js/alpine.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)