mirror of
https://github.com/python/cpython.git
synced 2025-11-02 14:41:33 +00:00
Raise statement normalization in Lib/.
This commit is contained in:
parent
8b3febef2f
commit
ce36ad8a46
80 changed files with 502 additions and 530 deletions
|
|
@ -378,7 +378,7 @@ class _popen:
|
|||
def __init__(self,cmd,mode='r',bufsize=None):
|
||||
|
||||
if mode != 'r':
|
||||
raise ValueError,'popen()-emulation only supports read mode'
|
||||
raise ValueError('popen()-emulation only supports read mode')
|
||||
import tempfile
|
||||
self.tmpfile = tmpfile = tempfile.mktemp()
|
||||
os.system(cmd + ' > %s' % tmpfile)
|
||||
|
|
@ -490,7 +490,7 @@ def _syscmd_ver(system='', release='', version='',
|
|||
pipe = popen(cmd)
|
||||
info = pipe.read()
|
||||
if pipe.close():
|
||||
raise os.error,'command failed'
|
||||
raise os.error('command failed')
|
||||
# XXX How can I supress shell errors from being written
|
||||
# to stderr ?
|
||||
except os.error as why:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue