1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 02:01:50 +00:00

[utils] Jython support - disable setproctitle() until ctypes is complete

This commit is contained in:
Yen Chi Hsuan 2016-02-21 03:29:02 +08:00
parent 399a76e67b
commit c1c05c67ea

View file

@ -1397,6 +1397,12 @@ def fix_xml_ampersands(xml_str):
def setproctitle(title): def setproctitle(title):
assert isinstance(title, compat_str) assert isinstance(title, compat_str)
# ctypes in Jython is not complete
# http://bugs.jython.org/issue2148
if sys.platform.startswith('java'):
return
try: try:
libc = ctypes.cdll.LoadLibrary('libc.so.6') libc = ctypes.cdll.LoadLibrary('libc.so.6')
except OSError: except OSError: