Skip to content

Commit

Permalink
sort script still not running
Browse files Browse the repository at this point in the history
  • Loading branch information
spirillen committed Jan 19, 2025
1 parent 2b771bb commit 08e93ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/sort_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import webbrowser
import re
import ipaddress
from subprocess import check_output
from subprocess import check_output, CalledProcessError
import requests
import idna
import dns.resolver
import dns.query

VERSION = "0.2b18" # Incremented beta version
VERSION = "0.2b19" # Incremented beta version

def find_files_by_name(directory, filenames):
matches = []
Expand All @@ -24,7 +24,11 @@ def find_files_by_name(directory, filenames):
return matches

def get_modified_files_in_last_commit():
output = check_output(["git", "diff", "--name-only", "HEAD~2", "HEAD"]).decode().splitlines()
try:
output = check_output(["git", "diff", "--name-only", "HEAD~2", "HEAD"]).decode().splitlines()
except CalledProcessError:
# Fallback to HEAD if there are not enough commits
output = check_output(["git", "diff", "--name-only", "HEAD"]).decode().splitlines()
return output

def fetch_valid_tlds(proxy):
Expand Down

0 comments on commit 08e93ac

Please sign in to comment.