Merge pull request #1070 from nilxam/improve_suppkg_rebuild

suppkg_rebuild: Clean up supportpkg list also
This commit is contained in:
Max Lin 2017-08-18 19:37:08 +08:00 committed by GitHub
commit 52cce8dd1d

View File

@ -41,10 +41,12 @@ class AcceptCommand(object):
tree = ET.parse(data)
root = tree.getroot()
for stg in root.findall('staging'):
if stg.get('name') == project:
if stg.get('name') == project:
stg.find('rebuild').text = 'unknown'
stg.find('supportpkg').text = ''
# reset accpted staging project rebuild state to unknown
# reset accpted staging project rebuild state to unknown and clean up
# supportpkg list
url = self.api.makeurl(['source', self.api.cstaging, 'dashboard', 'support_pkg_rebuild'])
content = ET.tostring(root)
http_PUT(url + '?comment=accept+command+update', data=content)