@@ -1239,7 +1239,7 @@ async def populate_jsone_context(chain, parent_link, decision_link, tasks_for):
12391239 "taskId" : None ,
12401240 }
12411241
1242- if chain .context .config ["cot_product " ] in ( "mobile" , "mpd001" , "application-services" , "xpi" ) :
1242+ if chain .context .config ["cot_product_type " ] == "github" :
12431243 if tasks_for == "github-release" :
12441244 jsone_context .update (await _get_additional_github_releases_jsone_context (decision_link ))
12451245 elif tasks_for == "cron" :
@@ -1251,8 +1251,8 @@ async def populate_jsone_context(chain, parent_link, decision_link, tasks_for):
12511251 elif tasks_for == "github-push" :
12521252 jsone_context .update (await _get_additional_github_push_jsone_context (decision_link ))
12531253 else :
1254- raise CoTError ('Unknown tasks_for "{}" for cot_product "{}"!' .format (tasks_for , chain .context .config ["cot_product" ]))
1255- else :
1254+ raise CoTError ('Unknown tasks_for "{}" for github cot_product "{}"!' .format (tasks_for , chain .context .config ["cot_product" ]))
1255+ elif chain . context . config [ "cot_product_type" ] == "hg" :
12561256 source_url = get_source_url (decision_link )
12571257 project = await get_project (chain .context , source_url )
12581258 jsone_context ["repository" ] = {
@@ -1268,7 +1268,11 @@ async def populate_jsone_context(chain, parent_link, decision_link, tasks_for):
12681268 elif tasks_for == "cron" :
12691269 jsone_context .update (await _get_additional_hg_cron_jsone_context (parent_link , decision_link ))
12701270 else :
1271- raise CoTError ("Unknown tasks_for {}!" .format (tasks_for ))
1271+ raise CoTError ('Unknown tasks_for "{}" for hg cot_product "{}"!' .format (tasks_for , chain .context .config ["cot_product" ]))
1272+ else :
1273+ raise CoTError (
1274+ 'Unknown cot_product_type "{}" for cot_product "{}"!' .format (chain .context .config ["cot_product_type" ], chain .context .config ["cot_product" ])
1275+ )
12721276
12731277 log .debug ("{} json-e context:" .format (parent_link .name ))
12741278 # format_json() breaks on lambda values; use pprint.pformat here.
0 commit comments