1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-22 03:52:37 +01:00

Ignore when it can't read project's phid

This commit is contained in:
Amir Sarabadani 2021-04-21 15:50:02 +02:00
parent 0faddcb714
commit 1f456c7b09

View file

@ -223,7 +223,10 @@ for rule in rules:
wanted_project_phid = client.lookupPhid('#' + rule['add']) wanted_project_phid = client.lookupPhid('#' + rule['add'])
for project_name in rule['in']: for project_name in rule['in']:
project_name = project_name.replace(' ', '_') project_name = project_name.replace(' ', '_')
try:
project_phid = client.lookupPhid('#' + project_name) project_phid = client.lookupPhid('#' + project_name)
except:
continue
for task_phid in client.getTasksWithProject(project_phid): for task_phid in client.getTasksWithProject(project_phid):
# if a task is in multiple 'in' projects, still only process it once # if a task is in multiple 'in' projects, still only process it once
if task_phid in handled_tasks: if task_phid in handled_tasks: