From db21942c61ae153480da775805f51965a5bea15d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 14 Apr 2018 01:48:52 +0200 Subject: [PATCH] Refactor something small --- jedi/_compatibility.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jedi/_compatibility.py b/jedi/_compatibility.py index cec07a4c..dfae5158 100644 --- a/jedi/_compatibility.py +++ b/jedi/_compatibility.py @@ -505,12 +505,11 @@ except ImportError: class GeneralizedPopen(subprocess.Popen): def __init__(self, *args, **kwargs): - creation_flags = 0 if os.name == 'nt': try: # Was introduced in Python 3.7. CREATE_NO_WINDOW = subprocess.CREATE_NO_WINDOW except AttributeError: CREATE_NO_WINDOW = 0x08000000 - creation_flags = CREATE_NO_WINDOW - super(GeneralizedPopen, self).__init__(*args, creationflags=creation_flags, **kwargs) + kwargs['creation_flags'] = CREATE_NO_WINDOW + super(GeneralizedPopen, self).__init__(*args, **kwargs)