mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00
Fix merge conflict from previous branch
This commit is contained in:
parent
110858a10e
commit
66b54c3482
@ -323,23 +323,12 @@ class InternManager():
|
||||
def check_dns_resolve(self):
|
||||
"""
|
||||
Check if the system's current DNS server can resolve a domain name.
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
Works on both Windows and Unix-like systems.
|
||||
>>>>>>> b8e28a30c0a58ff74e7fbfab03cf03810421cd90
|
||||
|
||||
Returns:
|
||||
bool: True if the current DNS server can resolve a domain name,
|
||||
False if can't resolve or in case of errors
|
||||
"""
|
||||
<<<<<<< HEAD
|
||||
try:
|
||||
resolver = dns.resolver.Resolver()
|
||||
# Simple DNS resolution test - will raise an exception if it fails
|
||||
resolver.resolve("github.com")
|
||||
return True
|
||||
except Exception:
|
||||
=======
|
||||
test_domains = ["github.com", "google.com", "microsoft.com", "amazon.com"]
|
||||
|
||||
try:
|
||||
@ -348,7 +337,6 @@ class InternManager():
|
||||
socket.gethostbyname(domain)
|
||||
return True
|
||||
except (socket.gaierror, socket.error):
|
||||
>>>>>>> b8e28a30c0a58ff74e7fbfab03cf03810421cd90
|
||||
return False
|
||||
|
||||
class OsSummary:
|
||||
|
Loading…
x
Reference in New Issue
Block a user