forked from M-Labs/artiq
1
0
Fork 0

master/experiments: log more details about experiment name conflicts

This commit is contained in:
Sebastien Bourdeauducq 2016-04-16 21:36:21 +08:00
parent b74aa12351
commit 0cf6df1933
1 changed files with 3 additions and 1 deletions

View File

@ -31,12 +31,14 @@ async def _get_repository_entries(entry_dict,
"name (%s)", name) "name (%s)", name)
name = name.replace("/", "_") name = name.replace("/", "_")
if name in entry_dict: if name in entry_dict:
logger.warning("Duplicate experiment name: '%s'", name)
basename = name basename = name
i = 1 i = 1
while name in entry_dict: while name in entry_dict:
name = basename + str(i) name = basename + str(i)
i += 1 i += 1
logger.warning("Duplicate experiment name: '%s'\n"
"Renaming class '%s' in '%s' to '%s'",
basename, class_name, filename, name)
entry = { entry = {
"file": filename, "file": filename,
"class_name": class_name, "class_name": class_name,