mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2025-01-03 10:29:36 +01:00
[compat] Avoid type comparison in compat_ord
NB This isn't actually a compat fn; it should be utils.int_from_int_or_char
This commit is contained in:
parent
9efa2a0d55
commit
045c63f951
@ -2970,7 +2970,7 @@ except (AssertionError, UnicodeEncodeError):
|
|||||||
|
|
||||||
|
|
||||||
def compat_ord(c):
|
def compat_ord(c):
|
||||||
if type(c) is int:
|
if isinstance(c, int):
|
||||||
return c
|
return c
|
||||||
else:
|
else:
|
||||||
return ord(c)
|
return ord(c)
|
||||||
|
Loading…
Reference in New Issue
Block a user