projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eee9a24
)
[compat] Avoid type comparison in `compat_ord`
author
dirkf
<fieldhouse@gmx.net>
Tue, 28 May 2024 14:59:34 +0000
(15:59 +0100)
committer
dirkf
<fieldhouse@gmx.net>
Thu, 30 May 2024 14:46:36 +0000
(15:46 +0100)
NB This isn't actually a compat fn; it should be utils.int_from_int_or_char
youtube_dl/compat.py
patch
|
blob
|
history
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index 0371896abc344a0c7fc6d038cd9e6ffa5b6a4e50..ed1a33cf2fb34e2eb256ea8654e90b9c7316cf3d 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-2970,7
+2970,7
@@
except (AssertionError, UnicodeEncodeError):
def compat_ord(c):
- if
type(c) is int
:
+ if
isinstance(c, int)
:
return c
else:
return ord(c)