chantra / rpms / rpm

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