refactor function in youtube_dl/compat.py

This commit is contained in:
suhussai 2015-09-04 21:56:28 -06:00
parent f71264490c
commit 266e977935

View File

@ -228,10 +228,7 @@ except ImportError: # Python < 3.3
def compat_ord(c):
if type(c) is int:
return c
else:
return ord(c)
return c if type(c) is int else ord(c)
if sys.version_info >= (3, 0):