From caa4b89954d79212fc0ac6d87fa07ed0c10803c5 Mon Sep 17 00:00:00 2001 From: Hugo Wang Date: Sun, 19 Feb 2017 13:53:10 +0800 Subject: [PATCH] fix getattr issue --- xonsh/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xonsh/jobs.py b/xonsh/jobs.py index 7c38364f9..e46f2e5a3 100644 --- a/xonsh/jobs.py +++ b/xonsh/jobs.py @@ -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