File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -255,17 +255,18 @@ def __repr__(self):
255255 self .type ,
256256 self .proto )
257257 if not closed :
258+ # getsockname and getpeername may not be available on WASI.
258259 try :
259260 laddr = self .getsockname ()
260261 if laddr :
261262 s += ", laddr=%s" % str (laddr )
262- except error :
263+ except ( error , AttributeError ) :
263264 pass
264265 try :
265266 raddr = self .getpeername ()
266267 if raddr :
267268 s += ", raddr=%s" % str (raddr )
268- except error :
269+ except ( error , AttributeError ) :
269270 pass
270271 s += '>'
271272 return s
Original file line number Diff line number Diff line change @@ -230,7 +230,8 @@ def main():
230230
231231 extmods = detect_extension_modules (args )
232232 omit_files = list (OMIT_FILES )
233- omit_files .extend (OMIT_NETWORKING_FILES )
233+ if sysconfig .get_platform ().startswith ("emscripten" ):
234+ omit_files .extend (OMIT_NETWORKING_FILES )
234235 for modname , modfiles in OMIT_MODULE_FILES .items ():
235236 if not extmods .get (modname ):
236237 omit_files .extend (modfiles )
You can’t perform that action at this time.
0 commit comments