We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cea1c62 commit 2724bd4Copy full SHA for 2724bd4
1 file changed
esp8266/scripts/webrepl.py
@@ -49,14 +49,19 @@ def stop():
49
listen_s.close()
50
51
52
-def start(port=8266):
+def start(port=8266, password=None):
53
stop()
54
- try:
55
- import port_config
56
- _webrepl.password(port_config.WEBREPL_PASS)
+ if password is None:
+ try:
+ import port_config
57
+ _webrepl.password(port_config.WEBREPL_PASS)
58
+ setup_conn(port, accept_conn)
59
+ print("Started webrepl in normal mode")
60
+ except:
61
+ import webrepl_setup
62
+ setup_conn(port, webrepl_setup.handle_conn)
63
+ print("Started webrepl in setup mode")
64
+ else:
65
+ _webrepl.password(password)
66
setup_conn(port, accept_conn)
67
print("Started webrepl in normal mode")
- except:
- import webrepl_setup
- setup_conn(port, webrepl_setup.handle_conn)
- print("Started webrepl in setup mode")
0 commit comments