gather: Fix checking string type
There is no unicode on Python 3, we should use six to hide this detail. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d4d264eb33
commit
5cc54cd587
@ -14,6 +14,7 @@
|
|||||||
# along with this program; if not, see <https://gnu.org/licenses/>.
|
# along with this program; if not, see <https://gnu.org/licenses/>.
|
||||||
|
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
import six
|
||||||
|
|
||||||
import pungi.arch
|
import pungi.arch
|
||||||
from pungi.util import pkg_is_rpm, pkg_is_srpm, pkg_is_debug
|
from pungi.util import pkg_is_rpm, pkg_is_srpm, pkg_is_debug
|
||||||
@ -61,8 +62,7 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
if pkg.arch not in valid_arches:
|
if pkg.arch not in valid_arches:
|
||||||
continue
|
continue
|
||||||
for gathered_pkg, pkg_arch in packages:
|
for gathered_pkg, pkg_arch in packages:
|
||||||
if (type(gathered_pkg) in [str, unicode]
|
if isinstance(gathered_pkg, six.string_types) and pkg.name != gathered_pkg:
|
||||||
and pkg.name != gathered_pkg):
|
|
||||||
continue
|
continue
|
||||||
elif (type(gathered_pkg) in [SimpleRpmWrapper, RpmWrapper]
|
elif (type(gathered_pkg) in [SimpleRpmWrapper, RpmWrapper]
|
||||||
and pkg.nevra != gathered_pkg.nevra):
|
and pkg.nevra != gathered_pkg.nevra):
|
||||||
|
Loading…
Reference in New Issue
Block a user