kopia lustrzana https://github.com/micropython/micropython-lib
socket: Add socket.error
Older CPython versions raised socker.error (or classes derived from it) as exceptions on errors. Various software still uses it to be compatible with older Python versions. As it's one-line fix, allow MicroPython to run such code too. try: socket... except socker.error as e: ...pull/63/head
rodzic
17d96d35b5
commit
ff27e3c8ba
|
@ -1,4 +1,4 @@
|
|||
srctype = micropython-lib
|
||||
type = module
|
||||
version = 0.3.2
|
||||
version = 0.3.3
|
||||
author = Paul Sokolovsky
|
||||
|
|
|
@ -6,7 +6,7 @@ from setuptools import setup
|
|||
|
||||
|
||||
setup(name='micropython-socket',
|
||||
version='0.3.2',
|
||||
version='0.3.3',
|
||||
description='socket module for MicroPython',
|
||||
long_description="This is a module reimplemented specifically for MicroPython standard library,\nwith efficient and lean design in mind. Note that this module is likely work\nin progress and likely supports just a subset of CPython's corresponding\nmodule. Please help with the development if you are interested in this\nmodule.",
|
||||
url='https://github.com/micropython/micropython/issues/405',
|
||||
|
|
|
@ -7,6 +7,8 @@ IPPROTO_IP = 0
|
|||
IP_ADD_MEMBERSHIP = 35
|
||||
IP_DROP_MEMBERSHIP = 36
|
||||
|
||||
error = OSError
|
||||
|
||||
def _resolve_addr(addr):
|
||||
if isinstance(addr, (bytes, bytearray)):
|
||||
return addr
|
||||
|
|
Ładowanie…
Reference in New Issue