Fix project list match with directory name
This change reverse the directory name creation to find projects name back from projects.yaml. Directories were created using: for project in projects.keys(): os.mkdir(project.title().replace(' ', '_')) Also fix DATE_MAX to match Liberty-Mitaka timeframe. Change-Id: I51cb272807e2b68f794b939319c198736722f340
This commit is contained in:
parent
d61e58fc9e
commit
c0f7aade5a
@ -7,10 +7,9 @@ import urllib
|
|||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
import pytz
|
import pytz
|
||||||
import string
|
|
||||||
|
|
||||||
DATE_MIN = '2015-03-04'
|
DATE_MIN = '2015-03-04'
|
||||||
DATE_MAX = '2016-01-03'
|
DATE_MAX = '2016-03-03'
|
||||||
|
|
||||||
BASE_URL = 'https://git.openstack.org/cgit'
|
BASE_URL = 'https://git.openstack.org/cgit'
|
||||||
PROJECTS_TAG = 'march-2016-elections'
|
PROJECTS_TAG = 'march-2016-elections'
|
||||||
@ -67,12 +66,9 @@ if project_name == "TC":
|
|||||||
project_list = projects.values()
|
project_list = projects.values()
|
||||||
else:
|
else:
|
||||||
for key in projects.keys():
|
for key in projects.keys():
|
||||||
for dirname in [key, string.capwords(key, '-'),
|
if key.title().replace(' ', '_') == project_name:
|
||||||
key.replace(' ', '_'),
|
project_list = [projects[key]]
|
||||||
string.capwords(key.replace(' ', '_'), '_')]:
|
break
|
||||||
if dirname == project_name:
|
|
||||||
project_list = [projects[key]]
|
|
||||||
break
|
|
||||||
|
|
||||||
if project_list is None:
|
if project_list is None:
|
||||||
print "Can't find project [%s] in %s" % (project_name, projects.keys())
|
print "Can't find project [%s] in %s" % (project_name, projects.keys())
|
||||||
|
Loading…
Reference in New Issue
Block a user