adi_command: another adi command fixes (#3)

Fix TypeError: 'str' object cannot be interpreted as an integer problem
This commit is contained in:
Max Lin 2019-11-19 19:38:54 +08:00 committed by Stephan Kulow
parent 9907fd8a98
commit 28ec31df5d

View File

@ -30,11 +30,11 @@ class AdiCommand:
return return
if info.find('untracked_requests/request') is not None: if info.find('untracked_requests/request') is not None:
print(query_project + ' ' + Fore.YELLOW + 'untracked: ' + ', '.join(['{}[{}]'.format( print(query_project + ' ' + Fore.YELLOW + 'untracked: ' + ', '.join(['{}[{}]'.format(
Fore.CYAN + req['package'] + Fore.RESET, req['number']) for req in info.findall('untracked_requests/request')])) Fore.CYAN + req.get('package') + Fore.RESET, req.get('id')) for req in info.findall('untracked_requests/request')]))
return return
if info.find('obsolete_requests/request') is not None: if info.find('obsolete_requests/request') is not None:
print(query_project + ' ' + Fore.YELLOW + 'obsolete: ' + ', '.join(['{}[{}]'.format( print(query_project + ' ' + Fore.YELLOW + 'obsolete: ' + ', '.join(['{}[{}]'.format(
Fore.CYAN + req['package'] + Fore.RESET, req['number']) for req in info.findall('obsolete_requests/request')])) Fore.CYAN + req.get('package') + Fore.RESET, req.get('id')) for req in info.findall('obsolete_requests/request')]))
return return
if info.find('broken_packages/package') is not None: if info.find('broken_packages/package') is not None:
print(query_project + ' ' + Fore.RED + 'broken: ' + ', '.join([ print(query_project + ' ' + Fore.RED + 'broken: ' + ', '.join([