python2: compat_str

This commit is contained in:
insaneracist 2020-11-02 15:22:17 -08:00
parent a926bd1c08
commit 729b407626
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import threading
import traceback import traceback
from .utils import ( from .utils import (
compat_str,
sanitized_Request sanitized_Request
) )
@ -15,7 +16,7 @@ class Heartbeat(object):
self.ydl = ydl self.ydl = ydl
data = params.get('data') data = params.get('data')
if type(data) is str: if isinstance(data, compat_str):
data = data.encode() data = data.encode()
self.request = sanitized_Request( self.request = sanitized_Request(
params.get('url'), params.get('url'),