Browse Source

fix for case-sensitive filesystems

main
Martin Dørum 2 years ago
parent
commit
6fe33583d8
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      tally.py

+ 4
- 4
tally.py View File



teams = {} teams = {}
users = {} users = {}
for teamName in os.listdir(jamdir):
if not os.path.exists(f"{jamdir}/{teamName}/TEAM"): continue
for realTeamName in os.listdir(jamdir):
if not os.path.exists(f"{jamdir}/{realTeamName}/TEAM"): continue


teamName = realTeamName.lower()
team = {"name": teamName, "users": [], "tally": 0} team = {"name": teamName, "users": [], "tally": 0}
teamName = teamName.lower()
teams[teamName] = team teams[teamName] = team
with open(f"{jamdir}/{teamName}/TEAM") as f:
with open(f"{jamdir}/{realTeamName}/TEAM") as f:
for line in f: for line in f:
for name in line.split(): for name in line.split():
name = name.strip().lower() name = name.strip().lower()

Loading…
Cancel
Save