Merge "Make abandon_old_reviews script to be compatible with python 3"

This commit is contained in:
Zuul 2020-09-28 08:52:29 +00:00 committed by Gerrit Code Review
commit 21fc89401e
1 changed files with 4 additions and 4 deletions

View File

@ -96,19 +96,19 @@ function unassign_and_new_bug {
PROJECTS="($(
python - <<EOF
import urllib2
from urllib.request import urlopen
import yaml
project = "$CLEAN_PROJECT"
data = urllib2.urlopen("https://raw.githubusercontent.com/openstack/"
data = urlopen("https://raw.githubusercontent.com/openstack/"
"governance/master/reference/projects.yaml")
governance = yaml.safe_load(data)
stadium = governance["neutron"]["deliverables"].keys()
query = ["project:openstack/%s" % p for p in stadium]
if project:
print project if project in query else ""
print(project if project in query else "")
else:
print ' OR '.join(query)
print( ' OR '.join(query))
EOF
))"