mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Remove shutil_custom monkeypatch
This commit is contained in:
parent
4191d3a30d
commit
51e390d6e5
2 changed files with 0 additions and 20 deletions
|
@ -1,6 +1,5 @@
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from core.utils import shutil_custom
|
|
||||||
from core.utils.common import clean_dir, flatten, get_dirs, process_dir
|
from core.utils.common import clean_dir, flatten, get_dirs, process_dir
|
||||||
from core.utils.download_info import get_download_info, update_download_info_status
|
from core.utils.download_info import get_download_info, update_download_info_status
|
||||||
from core.utils.encoding import char_replace, convert_to_ascii
|
from core.utils.encoding import char_replace, convert_to_ascii
|
||||||
|
@ -42,4 +41,3 @@ from core.utils.paths import (
|
||||||
from core.utils.processes import RunningProcess, restart
|
from core.utils.processes import RunningProcess, restart
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
shutil_custom.monkey_patch()
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from functools import partial
|
|
||||||
import shutil
|
|
||||||
from six import PY2
|
|
||||||
|
|
||||||
|
|
||||||
def monkey_patch(length=512 * 1024):
|
|
||||||
if PY2:
|
|
||||||
# On Python 2 monkey patch shutil.copyfileobj()
|
|
||||||
# to adjust the buffer length to 512KB rather than 4KB
|
|
||||||
original_copyfileobj = shutil.copyfileobj
|
|
||||||
shutil.copyfileobj = partial(original_copyfileobj, length=length)
|
|
Loading…
Add table
Add a link
Reference in a new issue