浏览代码

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

Yen Chi Hsuan 9 年之前
父节点
当前提交
c1c05c67ea
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      youtube_dl/utils.py

+ 6 - 0
youtube_dl/utils.py

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