check-candidacy: Allow '_' in filenames
Change-Id: I3831318a71073b3d92f006b570270b4eed8bef50
This commit is contained in:
parent
2c4116cafa
commit
a5695b2027
@ -24,13 +24,22 @@ def check_date(date):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def escape_author(author):
|
||||||
|
author = author.replace(' ', '+')
|
||||||
|
author = author.replace('_', '+')
|
||||||
|
|
||||||
|
return author
|
||||||
|
|
||||||
try:
|
try:
|
||||||
project_name = os.path.basename(os.path.dirname(sys.argv[1]))
|
project_name = os.path.basename(os.path.dirname(sys.argv[1]))
|
||||||
author = os.path.basename(sys.argv[1])[:-4].replace(' ', '+')
|
author = os.path.basename(sys.argv[1])[:-4]
|
||||||
except:
|
except:
|
||||||
print "usage: %s candidacy_file" % sys.argv[0]
|
print "usage: %s candidacy_file" % sys.argv[0]
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
author = escape_author(author)
|
||||||
|
|
||||||
if not os.path.isfile('.projects.yaml'):
|
if not os.path.isfile('.projects.yaml'):
|
||||||
open('.projects.yaml', 'w').write(
|
open('.projects.yaml', 'w').write(
|
||||||
urllib.urlopen(PROJECTS_URL).read()
|
urllib.urlopen(PROJECTS_URL).read()
|
||||||
@ -56,7 +65,7 @@ for project in project_list:
|
|||||||
if "commit/?id=" not in l:
|
if "commit/?id=" not in l:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
url = ('http://git.openstack.org/%s' %
|
url = ('http://git.openstack.org%s' %
|
||||||
re.search("href='([^']*)'", l).groups()[0])
|
re.search("href='([^']*)'", l).groups()[0])
|
||||||
date = re.search('<td>([^<]*)</td>', l).groups()[0]
|
date = re.search('<td>([^<]*)</td>', l).groups()[0]
|
||||||
if not check_date(date):
|
if not check_date(date):
|
||||||
|
Loading…
Reference in New Issue
Block a user