dcavalca / rpms / rpm

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