comparison mercurial/posix.py @ 49302:ee4537e365c8

py3: remove retry on EINTR errno Since the implementation of PEP 475 (Python 3.5), Python retries system calls failing with EINTR. Therefore we don?t need the logic that retries it in Python code.
author Manuel Jacob <me@manueljacob.de>
date Tue, 31 May 2022 04:11:34 +0200
parents 642e31cb55f0
children 53e9422a9b45
comparison
equal deleted inserted replaced
49301:c463f45fa114 49302:ee4537e365c8
714 This is a generic helper that will check for any activity 714 This is a generic helper that will check for any activity
715 (read, write. exception) and return the list of touched files. 715 (read, write. exception) and return the list of touched files.
716 716
717 In unsupported cases, it will raise a NotImplementedError""" 717 In unsupported cases, it will raise a NotImplementedError"""
718 try: 718 try:
719 while True: 719 res = select.select(fds, fds, fds)
720 try:
721 res = select.select(fds, fds, fds)
722 break
723 except select.error as inst:
724 if inst.args[0] == errno.EINTR:
725 continue
726 raise
727 except ValueError: # out of range file descriptor 720 except ValueError: # out of range file descriptor
728 raise NotImplementedError() 721 raise NotImplementedError()
729 return sorted(list(set(sum(res, [])))) 722 return sorted(list(set(sum(res, []))))
730 723
731 724