我在同一个功能上一直出错,我不知道为什么。我以为我第二次修复它,但不明白为什么这仍然是任何问题。错误会不时弹出。
这是我的第一个错误,但我修复了它。
File "running.py", line 332, in run
TypeError: argument of type 'NoneType' is not iterable ================================================================================
05Oct 03:06:48: Exit status: 1
这是我当前的代码
def get_notifyees(jobdef):
origNotifyeesList = jobdef['notifyees'] if isinstance(jobdef['notifyees'], list) or jobdef['notifyees'] is None else [jobdef['notifyees']]
origNotifyeesList = origNotifyeesList if origNotifyeesList is not None else []
notifyeesList = []
for notifyee in origNotifyeesList:
if 'noreply' not in notifyee:
notifyeesList.append(notifyee)
return notifyeesList
但我现在收到此错误
File "running.py", line 337, in get_notifyees
KeyError: 'notifyees'
================================================================================
10Oct 01:53:03: Exit status: 1