diff options
author | Amador Pahim <apahim@redhat.com> | 2017-09-01 13:28:19 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-15 20:12:00 -0300 |
commit | 63e0ba55222476c8b96d8c45131c830e00a80eaa (patch) | |
tree | e5dbd33d610f69668e9a8dac01f6f74bfc36c209 /scripts | |
parent | 4738b0a85a0c2031fddc71b51cccebce0c4ba6b1 (diff) |
qemu.py: use os.path.null instead of /dev/null
For increased portability, let's use os.path.devnull.
Signed-off-by: Amador Pahim <apahim@redhat.com>
Message-Id: <20170901112829.2571-4-apahim@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qemu.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qemu.py b/scripts/qemu.py index 8d3d24dd2b..c9bcaafe41 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -124,7 +124,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') proc = subprocess.Popen(fd_param, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = proc.communicate()[0] @@ -186,7 +186,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() |