On Fri, 08/18 19:05, Amador Pahim wrote:
> For increased portability, let's use os.path.devnull.
> 
> Signed-off-by: Amador Pahim <apa...@redhat.com>
> ---
>  scripts/qemu.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index ef531bb23b..51545f7f97 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -78,7 +78,7 @@ class QEMUMachine(object):
>          fd_param = ["%s" % self._socket_scm_helper,
>                      "%d" % self._qmp.get_sock_fd(),
>                      "%s" % fd_file_path]
> -        devnull = open('/dev/null', 'rb')
> +        devnull = open(os.path.devnull, 'rb')
>          p = subprocess.Popen(fd_param, stdin=devnull, stdout=subprocess.PIPE,
>                               stderr=subprocess.STDOUT)
>          output = p.communicate()[0]
> @@ -139,7 +139,7 @@ class QEMUMachine(object):
>  
>      def launch(self):
>          '''Launch the VM and establish a QMP connection'''
> -        devnull = open('/dev/null', 'rb')
> +        devnull = open(os.path.devnull, 'rb')
>          qemulog = open(self._qemu_log_path, 'wb')
>          try:
>              self._pre_launch()
> -- 
> 2.13.5
> 

Reviewed-by: Fam Zheng <f...@redhat.com>

Reply via email to