There is no way for a dictionary to return None for non-existing key if

a default value is provided
This commit is contained in:
rxwen 2014-01-14 23:22:48 +08:00
parent 62949c42ed
commit 5fc4a00b7c

View File

@ -176,7 +176,7 @@ def ForceSemanticCompletion( request_data ):
# A wrapper for subprocess.Popen that works around a Popen bug on Windows.
def SafePopen( *args, **kwargs ):
if kwargs.get( 'stdin', '' ) is None:
if kwargs.get( 'stdin' ) is None:
# We need this on Windows otherwise bad things happen. See issue #637.
kwargs[ 'stdin' ] = subprocess.PIPE if OnWindows() else None