mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Lazy load some python imports (perfs improved a lot).
This commit is contained in:
parent
4e379dcf9f
commit
cd4581c3df
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,4 @@
|
|||
import errno
|
||||
import requests
|
||||
import json
|
||||
|
||||
from moulinette import m18n
|
||||
|
@ -17,6 +16,7 @@ def download_text(url, timeout=30, expected_status_code=200):
|
|||
expected_status_code -- Status code expected from the request. Can be
|
||||
None to ignore the status code.
|
||||
"""
|
||||
import requests # lazy loading this module for performance reasons
|
||||
# Assumptions
|
||||
assert isinstance(url, str)
|
||||
|
||||
|
|
Loading…
Reference in a new issue