You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/custom_libs/subliminal_patch/refiners/util.py

12 lines
316 B

# coding=utf-8
5 years ago
from __future__ import absolute_import
import types
from subliminal_patch.http import TimeoutSession
def fix_session_bases(obj):
obj.__class__ = type("PatchedTimeoutSession", (TimeoutSession,),
{"request": types.MethodType(TimeoutSession.request, obj)})
return obj