Use os.devnull instead of /dev/null
This commit is contained in:
parent
aac428161f
commit
585f651919
@ -7,7 +7,7 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import rclexecm
|
import rclexecm
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
# Prototype for the html document we're returning. Info files are
|
# Prototype for the html document we're returning. Info files are
|
||||||
@ -55,7 +55,7 @@ class InfoExtractor:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
cmd = b'info --subnodes -o - -f ' + self.file
|
cmd = b'info --subnodes -o - -f ' + self.file
|
||||||
nullstream = open("/dev/null", 'w')
|
nullstream = open(os.devnull, 'w')
|
||||||
try:
|
try:
|
||||||
infostream = subprocess.Popen(cmd, shell=True, bufsize=1,
|
infostream = subprocess.Popen(cmd, shell=True, bufsize=1,
|
||||||
stderr=nullstream,
|
stderr=nullstream,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user