virtually accept: fix string type handling in Python3

This commit is contained in:
Max Lin 2019-05-28 16:48:09 +08:00
parent d7183777f0
commit 678f243b2b

View File

@ -12,6 +12,7 @@ from xml.etree import cElementTree as ET
from osc.core import change_request_state, show_package_meta, wipebinaries
from osc.core import http_GET, http_PUT, http_DELETE, http_POST
from osc.core import delete_package, search, set_devel_project
from osc.util.helper import decode_it
from osclib.config_command import ConfigCommand
from osclib.core import attribute_value_save
from osclib.core import attribute_value_load
@ -101,8 +102,7 @@ class AcceptCommand(object):
# Disable build and wipes the binary to the package and the sub-package
for pkg in pkgs:
meta = show_package_meta(self.api.apiurl, self.api.project, pkg)
meta = ''.join(meta)
meta = decode_it(b''.join(show_package_meta(self.api.apiurl, self.api.project, pkg)))
# Update package meta to disable build
self.api.create_package_container(self.api.project, pkg, meta=meta, disable_build=True)
wipebinaries(self.api.apiurl, self.api.project, package=pkg, repo=self.api.cmain_repo)