Do not fail when election directory doesn't exists
Change-Id: I608e36c95826cc8d75cbec3b5e7c791b3f9c2ece
This commit is contained in:
parent
df232c3074
commit
dd748cf296
@ -177,7 +177,11 @@ def dir2name(name, projects):
|
||||
|
||||
|
||||
def build_candidates_list(election=conf['release']):
|
||||
project_list = os.listdir(os.path.join(CANDIDATE_PATH, election))
|
||||
election_path = os.path.join(CANDIDATE_PATH, election)
|
||||
if os.path.exists(election_path):
|
||||
project_list = os.listdir(election_path)
|
||||
else:
|
||||
project_list = []
|
||||
project_list.sort()
|
||||
candidates_lists = {}
|
||||
for project in project_list:
|
||||
|
Loading…
Reference in New Issue
Block a user