mirror of https://github.com/pypa/pip
Merge pull request #9372 from jdufresne/devnull
Prefer subprocess.DEVNULL over open(os.devnull, 'w')
This commit is contained in:
commit
14830ae837
|
@ -22,15 +22,12 @@ def _create_svn_initools_repo(initools_dir):
|
||||||
'http://bitbucket.org/hltbra/pip-initools-dump/raw/8b55c908a320/'
|
'http://bitbucket.org/hltbra/pip-initools-dump/raw/8b55c908a320/'
|
||||||
'INITools_modified.dump'
|
'INITools_modified.dump'
|
||||||
)
|
)
|
||||||
devnull = open(os.devnull, 'w')
|
with open(filename) as dump:
|
||||||
dump = open(filename)
|
subprocess.check_call(
|
||||||
subprocess.check_call(
|
['svnadmin', 'load', initools_dir],
|
||||||
['svnadmin', 'load', initools_dir],
|
stdin=dump,
|
||||||
stdin=dump,
|
stdout=subprocess.DEVNULL,
|
||||||
stdout=devnull,
|
)
|
||||||
)
|
|
||||||
dump.close()
|
|
||||||
devnull.close()
|
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue