[{"id":1761610,"web_url":"http://patchwork.ozlabs.org/comment/1761610/","msgid":"<910515b9-5a65-2ef9-0091-21083cd0cf4e@amsat.org>","list_archive_url":null,"date":"2017-09-01T11:39:31","subject":"Re: [Qemu-devel] [PATCH v8 03/13] qemu.py: use os.path.null instead\n\tof /dev/null","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"On 09/01/2017 08:28 AM, Amador Pahim wrote:\n> For increased portability, let's use os.path.devnull.\n> \n> Signed-off-by: Amador Pahim <apahim@redhat.com>\n\nReviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n\n> ---\n>   scripts/qemu.py | 4 ++--\n>   1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/scripts/qemu.py b/scripts/qemu.py\n> index aca6fa4d82..a6e06291ea 100644\n> --- a/scripts/qemu.py\n> +++ b/scripts/qemu.py\n> @@ -79,7 +79,7 @@ class QEMUMachine(object):\n>           fd_param = [\"%s\" % self._socket_scm_helper,\n>                       \"%d\" % self._qmp.get_sock_fd(),\n>                       \"%s\" % fd_file_path]\n> -        devnull = open('/dev/null', 'rb')\n> +        devnull = open(os.path.devnull, 'rb')\n>           p = subprocess.Popen(fd_param, stdin=devnull, stdout=subprocess.PIPE,\n>                                stderr=subprocess.STDOUT)\n>           output = p.communicate()[0]\n> @@ -140,7 +140,7 @@ class QEMUMachine(object):\n>   \n>       def launch(self):\n>           '''Launch the VM and establish a QMP connection'''\n> -        devnull = open('/dev/null', 'rb')\n> +        devnull = open(os.path.devnull, 'rb')\n>           qemulog = open(self._qemu_log_path, 'wb')\n>           try:\n>               self._pre_launch()\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"J5T9fQHk\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkHS96K6Fz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 21:43:21 +1000 (AEST)","from localhost ([::1]:36520 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnkM3-0002lg-TS\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 07:43:19 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33767)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnkIW-0008Fh-6N\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 07:39:44 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnkIT-0000w5-2s\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 07:39:40 -0400","from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33139)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnkIS-0000vy-UQ\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 07:39:37 -0400","by mail-qk0-x242.google.com with SMTP id k126so1637619qkb.0\n\tfor <qemu-devel@nongnu.org>; Fri, 01 Sep 2017 04:39:36 -0700 (PDT)","from [192.168.1.10] ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\ta63sm7072050qkb.45.2017.09.01.04.39.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 01 Sep 2017 04:39:35 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=QBdDPF6Why7202fDsI1sDyMengFzZsGx0aYN7ZcAdEU=;\n\tb=J5T9fQHkXJOeCutGdAiEu0ZLktiyzSaloKgxrAOEvV2abuVssnQH1g8mk18YUexpZS\n\tgQqKmflsq7sFTPoKr8fdgjFJytIGJjPBhRu31LsqOkwNF2M1NT/OMLWCAED/XbtkE8f3\n\t7LKHsjcsLAXwh0k2kO7VoyxZRtfLdlkhoMwuKE5IMi9cvntnJfI4/GA2Zj16XHJ2PyB5\n\tWBj3VEH9hvXkjm4aYJ/X+x28X/NSIn5v9tm7X6WRwFiBCTfi/gJGgjGaS4OjL5jIVXJX\n\tzLjYVT47kwT/9ugFs5S6zC7TMhEcgkwlSCOq4eOMV/ZhhL/fEvxXp5wsKq+CS47Nyy0+\n\tDXrQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=QBdDPF6Why7202fDsI1sDyMengFzZsGx0aYN7ZcAdEU=;\n\tb=OGMrAPxbojSXoq0y2kgFYwty0TgeTOJOJ/zQl43v76GgYMdgnMzxnBL9aWoeOl0qHu\n\tv6VOt+EQGlrTJkUWgiP1VRKfdIZBKypl/H02smPmxV3/LPN3rVynziBbRygeJQMyIjd7\n\t+5GlwRkBwfY4f+qSm9uW/DCYkXLvB3EcQQqZTIj5DCFBISW3coWgYEIprJEYYhndkoKl\n\tbtVymZ9fIrHVwJzLpsNagou7y9ctKqFSmJquLe1Nxavkm4pdcJevXvAZzcg0rCkbCe4P\n\tGfpi1b0lDeF4lD3SYmRMjJBNC3fFMNDyOr2egKtDF8wk5bzrARAtZbzuEWYFy+jJxyHZ\n\tSL6g==","X-Gm-Message-State":"AHPjjUhzWyKSN8VWTMIXLyL5bzp2eq8z9qrPkOrg12W9MRSiMlZ/MaEZ\n\tCqkrjE8EkCH/MQ==","X-Google-Smtp-Source":"ADKCNb5CzTBwAxLBM6g54SdkQnUidghgsETksW2qpHuvOqi83Ev1PRd4ufAY8IvjXSJOfoGxovwvyQ==","X-Received":"by 10.55.164.214 with SMTP id n205mr2205453qke.28.1504265976273; \n\tFri, 01 Sep 2017 04:39:36 -0700 (PDT)","To":"Amador Pahim <apahim@redhat.com>, qemu-devel@nongnu.org","References":"<20170901112829.2571-1-apahim@redhat.com>\n\t<20170901112829.2571-4-apahim@redhat.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<910515b9-5a65-2ef9-0091-21083cd0cf4e@amsat.org>","Date":"Fri, 1 Sep 2017 08:39:31 -0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170901112829.2571-4-apahim@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::242","Subject":"Re: [Qemu-devel] [PATCH v8 03/13] qemu.py: use os.path.null instead\n\tof /dev/null","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, ldoktor@redhat.com, famz@redhat.com,\n\tehabkost@redhat.com, \n\tstefanha@gmail.com, armbru@redhat.com, mreitz@redhat.com,\n\tcrosa@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1762931,"web_url":"http://patchwork.ozlabs.org/comment/1762931/","msgid":"<20170905025924.GG22515@lemon.lan>","list_archive_url":null,"date":"2017-09-05T02:59:24","subject":"Re: [Qemu-devel] [PATCH v8 03/13] qemu.py: use os.path.null instead\n\tof /dev/null","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Fri, 09/01 13:28, Amador Pahim wrote:\n> For increased portability, let's use os.path.devnull.\n> \n> Signed-off-by: Amador Pahim <apahim@redhat.com>\n\nReviewed-by: Fam Zheng <famz@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmWmb5yFwz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 13:05:19 +1000 (AEST)","from localhost ([::1]:56575 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dp4Aw-0002ym-0t\n\tfor incoming@patchwork.ozlabs.org; Mon, 04 Sep 2017 23:05:18 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51741)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dp45O-0007M1-PP\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 22:59:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dp45K-0004dn-B2\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 22:59:34 -0400","from mx1.redhat.com ([209.132.183.28]:38768)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dp45K-0004cf-4N\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 22:59:30 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0B0B2356ED;\n\tTue,  5 Sep 2017 02:59:29 +0000 (UTC)","from localhost (ovpn-12-97.pek2.redhat.com [10.72.12.97])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 40A9F6A91E;\n\tTue,  5 Sep 2017 02:59:26 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 0B0B2356ED","Date":"Tue, 5 Sep 2017 10:59:24 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Amador Pahim <apahim@redhat.com>","Message-ID":"<20170905025924.GG22515@lemon.lan>","References":"<20170901112829.2571-1-apahim@redhat.com>\n\t<20170901112829.2571-4-apahim@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170901112829.2571-4-apahim@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tTue, 05 Sep 2017 02:59:29 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v8 03/13] qemu.py: use os.path.null instead\n\tof /dev/null","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, ldoktor@redhat.com, ehabkost@redhat.com,\n\tstefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com,\n\tcrosa@redhat.com, mreitz@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]