mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-11 01:30:30 +03:00
tests: use yaml.Loader on older yaml versions
This commit is contained in:
parent
709f4c9b18
commit
89f63b3e1c
1 changed files with 7 additions and 1 deletions
|
|
@ -29,7 +29,13 @@ except ImportError:
|
||||||
try:
|
try:
|
||||||
from yaml import CFullLoader as FullLoader
|
from yaml import CFullLoader as FullLoader
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import FullLoader
|
try:
|
||||||
|
# FullLoader is available from PyYaml 5.1+, as we don't load user
|
||||||
|
# controlled data here, it's okay to fall back the unsafe older
|
||||||
|
# Loader
|
||||||
|
from yaml import FullLoader
|
||||||
|
except ImportError:
|
||||||
|
from yaml import Loader as FullLoader
|
||||||
|
|
||||||
localmodule = os.path.realpath(
|
localmodule = os.path.realpath(
|
||||||
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
|
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue