mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
fix for categories containing '.'
Files with ':' in their name cannot be imported, as __import__() will try to interpret them as submodules.
This commit is contained in:
parent
c297745118
commit
28b79354fb
7
scripts/export_tests.py
Normal file → Executable file
7
scripts/export_tests.py
Normal file → Executable file
@ -12,6 +12,8 @@ import re
|
||||
import sys
|
||||
import itertools
|
||||
import collections
|
||||
|
||||
import util
|
||||
from gallery_dl import extractor
|
||||
|
||||
|
||||
@ -314,8 +316,9 @@ def main():
|
||||
|
||||
os.makedirs(args.target, exist_ok=True)
|
||||
for name, tests in collect_tests(args.category).items():
|
||||
with open(f"{args.target}/{name}.py", "w") as fp:
|
||||
fp.write(export_tests(tests))
|
||||
name = name.replace(".", "")
|
||||
with util.lazy(f"{args.target}/{name}.py") as file:
|
||||
file.write(export_tests(tests))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user