refactor function in youtube_dl/compat.py
This commit is contained in:
parent
f71264490c
commit
266e977935
@ -228,10 +228,7 @@ except ImportError: # Python < 3.3
|
|||||||
|
|
||||||
|
|
||||||
def compat_ord(c):
|
def compat_ord(c):
|
||||||
if type(c) is int:
|
return c if type(c) is int else ord(c)
|
||||||
return c
|
|
||||||
else:
|
|
||||||
return ord(c)
|
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info >= (3, 0):
|
if sys.version_info >= (3, 0):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user