dcavalca / rpms / rpm

Forked from rpms/rpm a year ago
Clone

Blame 0005-Drop-an-unnecessary-Python-2-vs-3-incompatibility-fr.patch

James Antill ee2eaf
From 98470eccf09b80ed11528ac893852d649c50be72 Mon Sep 17 00:00:00 2001
James Antill ee2eaf
Message-Id: <98470eccf09b80ed11528ac893852d649c50be72.1571920849.git.pmatilai@redhat.com>
James Antill ee2eaf
In-Reply-To: <6b6c4d881dc6fc99f949dac4aaf9a513542f9956.1571920849.git.pmatilai@redhat.com>
James Antill ee2eaf
References: <6b6c4d881dc6fc99f949dac4aaf9a513542f9956.1571920849.git.pmatilai@redhat.com>
James Antill ee2eaf
From: Panu Matilainen <pmatilai@redhat.com>
James Antill ee2eaf
Date: Fri, 5 Oct 2018 14:05:27 +0300
James Antill ee2eaf
Subject: [PATCH 5/5] Drop an unnecessary Python 2 vs 3 incompatibility from
James Antill ee2eaf
 the test
James Antill ee2eaf
James Antill ee2eaf
Python 2 speaks about 'type' whereas 3 speaks about 'class', which from
James Antill ee2eaf
our perspective is just unnecessary pain with no gain.
James Antill ee2eaf
James Antill ee2eaf
(cherry picked from commit ff3d8ac2e5cb4456ad1355f227f3ccef08e01972)
James Antill ee2eaf
---
James Antill ee2eaf
 tests/rpmpython.at | 3 +--
James Antill ee2eaf
 1 file changed, 1 insertion(+), 2 deletions(-)
James Antill ee2eaf
James Antill ee2eaf
diff --git a/tests/rpmpython.at b/tests/rpmpython.at
James Antill ee2eaf
index ae020ae95..bc42e49e4 100644
James Antill ee2eaf
--- a/tests/rpmpython.at
James Antill ee2eaf
+++ b/tests/rpmpython.at
James Antill ee2eaf
@@ -92,7 +92,7 @@ h['arch'] = 'noarch'
James Antill ee2eaf
 myprint(h['nevra'])
James Antill ee2eaf
 del h['epoch']
James Antill ee2eaf
 myprint(h['nevra'])
James Antill ee2eaf
-for a in ['name', 'bugurl', '__class__', '__foo__', ]:
James Antill ee2eaf
+for a in ['name', 'bugurl', '__foo__', ]:
James Antill ee2eaf
     try:
James Antill ee2eaf
         x = getattr(h, a)
James Antill ee2eaf
         myprint(x)
James Antill ee2eaf
@@ -103,7 +103,6 @@ for a in ['name', 'bugurl', '__class__', '__foo__', ]:
James Antill ee2eaf
 testpkg-1.0-1.noarch
James Antill ee2eaf
 testpkg
James Antill ee2eaf
 None
James Antill ee2eaf
-<type 'rpm.hdr'>
James Antill ee2eaf
 'rpm.hdr' object has no attribute '__foo__']
James Antill ee2eaf
 )
James Antill ee2eaf
 
James Antill ee2eaf
-- 
James Antill ee2eaf
2.21.0
James Antill ee2eaf