use os.devnull for python2 support
This commit is contained in:
parent
c1164d2bd1
commit
138be33349
1 changed files with 8 additions and 7 deletions
|
@ -12,7 +12,7 @@
|
|||
import logging
|
||||
import os
|
||||
import platform
|
||||
from subprocess import Popen, PIPE, DEVNULL
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from .base import BaseProject
|
||||
try:
|
||||
|
@ -54,6 +54,7 @@ class Subversion(BaseProject):
|
|||
'/usr/local/bin/svn',
|
||||
]
|
||||
for location in locations:
|
||||
with open(os.devnull, 'wb') as DEVNULL:
|
||||
try:
|
||||
Popen([location, '--version'], stdout=DEVNULL, stderr=DEVNULL)
|
||||
self.binary_location = location
|
||||
|
|
Loading…
Reference in a new issue