Issue #24839: platform._syscmd_ver raises DeprecationWarning
This commit is contained in:
parent
2ab6ddb19d
commit
cae101f5ec
|
@ -440,7 +440,7 @@ def _syscmd_ver(system='', release='', version='',
|
|||
# Try some common cmd strings
|
||||
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
|
||||
try:
|
||||
pipe = popen(cmd)
|
||||
pipe = os.popen(cmd)
|
||||
info = pipe.read()
|
||||
if pipe.close():
|
||||
raise OSError('command failed')
|
||||
|
|
Loading…
Reference in New Issue