Skip to content

Commit

Permalink
Optimizing workflows version.x.n
Browse files Browse the repository at this point in the history
  • Loading branch information
spirillen committed Jan 18, 2025
1 parent 0de990a commit 3db210f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tools/sort_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import ipaddress
from subprocess import check_output
import requests
import PyFunceble
import PyFunceble.facility

# Add the directory containing domain2idna to the Python path
sys.path.append('/home/spirillen/.local/bin')

# Import the domain2idna module
import domain2idna # For IDN support

VERSION = "0.2b14" # PEP 440 versioning format for beta release
VERSION = "0.2b15" # PEP 440 versioning format for beta release

def find_files_by_name(directory, filenames):
matches = []
Expand Down Expand Up @@ -109,8 +109,15 @@ def remove_duplicates(lines):

def test_domain_with_pyfunceble(domain):
try:
result = PyFunceble.check(domain)
return result
PyFunceble.facility.ConfigLoader.custom_config = {
"cli_testing": False,
"file_generation": False,
"quiet": True,
"logging_level": "critical",
}
PyFunceble.facility.ConfigLoader.start()
result = PyFunceble.DomainAvailability(domain).availability()
return result["status"]
except Exception as e:
print(f"Error testing domain {domain}: {e}")
return "UNKNOWN"
Expand Down

0 comments on commit 3db210f

Please sign in to comment.