fix getattr issue

This commit is contained in:
Hugo Wang 2017-02-19 13:53:10 +08:00
parent edadbcab64
commit caa4b89954

View file

@ -139,7 +139,7 @@ else:
os.tcsetpgrp(FD_STDERR, pgid)
return True
except OSError as e:
if getattr(e, 'errno') == 22: # [Errno 22] Invalid argument
if e.errno == 22: # [Errno 22] Invalid argument
# there are cases that all the processes of pgid have
# finished, then we don't need to do anything here, see
# issue #2220