Skip to content

Commit 7cc523c

Browse files
Allow logo.64.png for logos
1 parent 8ed16f5 commit 7cc523c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misc-tools/import-contest.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def import_images(entity: str, property: str, filename_regexes: List[str]):
6767
files matching the regexes will be considered and if multiple files match the regexes the file
6868
with the first matched regex will be used"""
6969

70-
if not os.path.isdir(entity):
70+
if not os.path.isdir(entity) and not os.path.islink(entity):
7171
return
7272
images_per_entity = {}
7373
with open(f'{entity}.json') as entityFile:
@@ -151,7 +151,7 @@ if import_file('organizations', ['organizations.json']):
151151
# Also import logos if we have any
152152
# We prefer the 64x64 logo. If it doesn't exist, accept a generic logo (which might be a SVG)
153153
# We also prefer PNG/SVG before JPG
154-
import_images('organizations', 'logo', ['^logo\\.64x\\d+\\.png$', '^logo\\.(png|svg)$', '^logo\\.64x\\d+\\.jpg$', '^logo\\.jpg$'])
154+
import_images('organizations', 'logo', ['^logo\\.64(x\\d+)?\\.png$', '^logo\\.(png|svg)$', '^logo\\.64(x\\d+)?\\.jpg$', '^logo\\.jpg$'])
155155
if import_file('teams', ['teams.json', 'teams2.tsv']):
156156
# Also import photos if we have any, but prefer JPG over SVG and PNG
157157
import_images('teams', 'photo', ['^photo\\.jpg$', '^photo\\.(png|svg)$'])

0 commit comments

Comments
 (0)