File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -769,18 +769,15 @@ def _can_use_pidfd_open():
769769
770770def _can_use_kqueue ():
771771 # Availability: macOS, BSD
772- if not all (
773- hasattr (select , x )
774- for x in (
775- "kqueue" ,
776- "KQ_EV_ADD" ,
777- "KQ_EV_ONESHOT" ,
778- "KQ_FILTER_PROC" ,
779- "KQ_NOTE_EXIT" ,
780- )
781- ):
772+ names = (
773+ "kqueue" ,
774+ "KQ_EV_ADD" ,
775+ "KQ_EV_ONESHOT" ,
776+ "KQ_FILTER_PROC" ,
777+ "KQ_NOTE_EXIT" ,
778+ )
779+ if not all (hasattr (select , x ) for x in names ):
782780 return False
783-
784781 kq = None
785782 try :
786783 kq = select .kqueue ()
@@ -790,7 +787,7 @@ def _can_use_kqueue():
790787 flags = select .KQ_EV_ADD | select .KQ_EV_ONESHOT ,
791788 fflags = select .KQ_NOTE_EXIT ,
792789 )
793- events = kq .control ([kev ], 1 , 0 )
790+ kq .control ([kev ], 1 , 0 )
794791 return True
795792 except OSError as err :
796793 if err .errno in {errno .EMFILE , errno .ENFILE }:
You can’t perform that action at this time.
0 commit comments