all: Replace all uses of umodule in Python code.
Applies to drivers/examples/extmod/port-modules/tools. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
try:
|
||||
import usocket as socket
|
||||
except:
|
||||
import socket
|
||||
import socket
|
||||
|
||||
|
||||
def main(use_stream=False):
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
try:
|
||||
import usocket as _socket
|
||||
except:
|
||||
import _socket
|
||||
try:
|
||||
import ussl as ssl
|
||||
except:
|
||||
import ssl
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
|
||||
def main(use_stream=True):
|
||||
s = _socket.socket()
|
||||
s = socket.socket()
|
||||
|
||||
ai = _socket.getaddrinfo("google.com", 443)
|
||||
ai = socket.getaddrinfo("google.com", 443)
|
||||
print("Address infos:", ai)
|
||||
addr = ai[0][-1]
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
try:
|
||||
import usocket as socket
|
||||
except:
|
||||
import socket
|
||||
import socket
|
||||
|
||||
|
||||
CONTENT = b"""\
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# Do not use this code in real projects! Read
|
||||
# http_server_simplistic_commented.py for details.
|
||||
try:
|
||||
import usocket as socket
|
||||
except:
|
||||
import socket
|
||||
import socket
|
||||
|
||||
|
||||
CONTENT = b"""\
|
||||
|
||||
@@ -8,10 +8,7 @@
|
||||
# details, and use this code only for quick hacks, preferring
|
||||
# http_server.py for "real thing".
|
||||
#
|
||||
try:
|
||||
import usocket as socket
|
||||
except:
|
||||
import socket
|
||||
import socket
|
||||
|
||||
|
||||
CONTENT = b"""\
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import ubinascii as binascii
|
||||
|
||||
try:
|
||||
import usocket as socket
|
||||
except:
|
||||
import socket
|
||||
import ussl as ssl
|
||||
import binascii
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
|
||||
# This self-signed key/cert pair is randomly generated and to be used for
|
||||
|
||||
Reference in New Issue
Block a user