AirtestProject / Poco

A cross-engine test automation framework based on UI inspection
http://airtest.netease.com/
Apache License 2.0
1.74k stars 315 forks source link

Fix the exception handling for cases where socket.gaierror is thrown. #579

Open heri3x opened 1 year ago

heri3x commented 1 year ago

I encountered an issue where the line "ip = self.device.get_ip_address()" was throwing a socket.gaierror exception and not being handled properly, causing the program to exit.

And I fixed this problem.

By the way, it seems that the socket.gaierror exception occurs in a Windows environment when a DNS suffix is set and the "Use this connection's DNS suffix in DNS registration" option is not checked in the network connection. Checking the "Use this connection's DNS suffix in DNS registration" option will prevent this issue from occurring.

Environment: