Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
2724bd4a
Commit
2724bd4a
authored
8 years ago
by
Noah Rosamilia
Committed by
Paul Sokolovsky
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
esp8266/scripts/webrepl: Add optional password argument to webrepl.start()
This commit fixes issue #2045
parent
cea1c621
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
esp8266/scripts/webrepl.py
+13
-8
13 additions, 8 deletions
esp8266/scripts/webrepl.py
with
13 additions
and
8 deletions
esp8266/scripts/webrepl.py
+
13
−
8
View file @
2724bd4a
...
...
@@ -49,14 +49,19 @@ def stop():
listen_s
.
close
()
def
start
(
port
=
8266
):
def
start
(
port
=
8266
,
password
=
None
):
stop
()
try
:
import
port_config
_webrepl
.
password
(
port_config
.
WEBREPL_PASS
)
if
password
is
None
:
try
:
import
port_config
_webrepl
.
password
(
port_config
.
WEBREPL_PASS
)
setup_conn
(
port
,
accept_conn
)
print
(
"
Started webrepl in normal mode
"
)
except
:
import
webrepl_setup
setup_conn
(
port
,
webrepl_setup
.
handle_conn
)
print
(
"
Started webrepl in setup mode
"
)
else
:
_webrepl
.
password
(
password
)
setup_conn
(
port
,
accept_conn
)
print
(
"
Started webrepl in normal mode
"
)
except
:
import
webrepl_setup
setup_conn
(
port
,
webrepl_setup
.
handle_conn
)
print
(
"
Started webrepl in setup mode
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment