mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 19:45:24 +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):
|
def check_dns_resolve(self):
|
||||||
"""
|
"""
|
||||||
Check if the system's current DNS server can resolve a domain name.
|
Check if the system's current DNS server can resolve a domain name.
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
Works on both Windows and Unix-like systems.
|
Works on both Windows and Unix-like systems.
|
||||||
>>>>>>> b8e28a30c0a58ff74e7fbfab03cf03810421cd90
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True if the current DNS server can resolve a domain name,
|
bool: True if the current DNS server can resolve a domain name,
|
||||||
False if can't resolve or in case of errors
|
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"]
|
test_domains = ["github.com", "google.com", "microsoft.com", "amazon.com"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -348,7 +337,6 @@ class InternManager():
|
|||||||
socket.gethostbyname(domain)
|
socket.gethostbyname(domain)
|
||||||
return True
|
return True
|
||||||
except (socket.gaierror, socket.error):
|
except (socket.gaierror, socket.error):
|
||||||
>>>>>>> b8e28a30c0a58ff74e7fbfab03cf03810421cd90
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
class OsSummary:
|
class OsSummary:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user