Browse Source

Make abandon_old_reviews script to be compatible with python 3

Change-Id: Ic845105050c2b32c4fe0943ae3bcc462a6f5ed51
changes/49/754449/1
Slawek Kaplonski 10 months ago
parent
commit
e613ffab7d
  1. 8
      tools/abandon_old_reviews.sh

8
tools/abandon_old_reviews.sh

@ -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
))"

Loading…
Cancel
Save