From nobody Fri Apr 26 18:15:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522302931985203.98040349732025; Wed, 28 Mar 2018 22:55:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9D282F30A4; Thu, 29 Mar 2018 05:55:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E06AE600CC; Thu, 29 Mar 2018 05:55:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D8D511809547; Thu, 29 Mar 2018 05:55:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2T5tUT8008579 for ; Thu, 29 Mar 2018 01:55:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 17E8060C8F; Thu, 29 Mar 2018 05:55:30 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1111B60C80 for ; Thu, 29 Mar 2018 05:55:27 +0000 (UTC) Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C822D7F7B1 for ; Thu, 29 Mar 2018 05:55:26 +0000 (UTC) Received: by mail-pf0-f177.google.com with SMTP id g14so2551521pfh.3 for ; Wed, 28 Mar 2018 22:55:26 -0700 (PDT) Received: from localhost.localdomain ([112.196.135.186]) by smtp.gmail.com with ESMTPSA id n187sm10748066pfn.8.2018.03.28.22.55.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 22:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fvfXrEumajh19wg+tmmb+IvCqZ3tOXf5DZNacvzbuqk=; b=sY/YtAOs0S9XoupzBvFB5XXKxVIb6ccV9wkTof8p0fvdo5+5G20lWk/UHu3WFyuxWX 82yGj+cfzu9B1iuqQJg5Hyr8xsJulRjEG2/6QSzSO1As8rXF+dAjMzzkFj8gAMGjkd0m Xs53dYnNUa0RtxHQvgqayQ4teTZAI6Zkrmgjmj4Yj8Kuc3SCFy8VPRvac2bVNhn7SpZA nD5uC0uow6md/2Nv0iYa7SAabsAYRWQ36R7UfCHe/+FOCnLy+heltbjlFwCa09NF3YrP PojWOy93cc31sYM0FnY4ldkl70/l5WIRRk6U12sCswAaRM0CxXdPvb0SyKRO806gNS6L 3+0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fvfXrEumajh19wg+tmmb+IvCqZ3tOXf5DZNacvzbuqk=; b=Qj9ya63fN3qD/8UCxuyRd4DEKpLyElijPcdhlA504lzqwQkgYUAUWqIoTjInNZ3fZL hHQuMPqozl92RXJLPXDML2YGoxiERVYZwN/8nWQn2xp8C/KhxGspqoJfCjpgaHva392q 3GZPo9WUSoGXt17exW/PnjsZiDLxqEqUpbSD6P1xz5kxSelQ5fUn5yQhD4weSpM6wqRb Y0BRnImpEgQKjTP3qbn4P8jRZp4GBj7iXJTBJz7+8czfwvFxyAi7JdjNlDLbXwmWQG62 WtQdqCM2ogOrCGoaqjFa3rn30GUX4EL/yCt8hlO9CDFb4ICbSp+iuV9CwFDL7i3C/7om iFxA== X-Gm-Message-State: AElRT7E+n8r7C448fkFSvqHuRyc3Yg4e+AYgI2FUfvchclh8XzAhlFKg S5PRBUHyy1A6HADRaaaYQnmj2Q== X-Google-Smtp-Source: AIpwx4/FhQpbEIlVAZDu64IwuPKg5D5gB3is50mxzFhtIKPZl+7xiPTp5aquKMPCn5TY8QpGOjYi8Q== X-Received: by 2002:a17:902:2e:: with SMTP id 43-v6mr6855329pla.282.1522302925983; Wed, 28 Mar 2018 22:55:25 -0700 (PDT) From: Shubham Jain To: patchew-devel@redhat.com Date: Thu, 29 Mar 2018 11:25:05 +0530 Message-Id: <20180329055505.27452-1-shubhamjain7495@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 29 Mar 2018 05:55:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 29 Mar 2018 05:55:26 +0000 (UTC) for IP:'209.85.192.177' DOMAIN:'mail-pf0-f177.google.com' HELO:'mail-pf0-f177.google.com' FROM:'shubhamjain7495@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.639 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_WEB, SPF_PASS) 209.85.192.177 mail-pf0-f177.google.com 209.85.192.177 mail-pf0-f177.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Cc: Shubham Jain Subject: [Patchew-devel] [PATCH] Use gzip module X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 29 Mar 2018 05:55:30 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In class PatchewTestCase, cat doesn't stat the ".gz" files for MacOS. Chang= ed it to use the gzip module instead of subprocess. --- tests/patchewtest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/patchewtest.py b/tests/patchewtest.py index 7e51e70..5bed3b9 100644 --- a/tests/patchewtest.py +++ b/tests/patchewtest.py @@ -16,6 +16,7 @@ import shutil import argparse import json import atexit +import gzip =20 BASE_DIR =3D os.path.join(os.path.dirname(__file__), "..") =20 @@ -102,7 +103,9 @@ class PatchewTestCase(django.test.LiveServerTestCase): def get_data_path(self, fname): r =3D tempfile.NamedTemporaryFile(dir=3DRUN_DIR, prefix=3D"test-da= ta-", delete=3DFalse) d =3D os.path.join(BASE_DIR, "tests", "data", fname) - r.write(subprocess.check_output(["zcat", d])) + with gzip.open(d, 'rb') as f: + file_content =3D f.read() + r.write(file_content) r.close() return r.name =20 --=20 2.14.3 (Apple Git-98) _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel