From 1e53aa21cbaafd10fa786d638d082f525a1842ef Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 19 May 2021 15:15:25 +0200 Subject: [PATCH] debug script ignore non scodoc folders in Zope --- debug.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debug.py b/debug.py index 4b7d3e45..676f3039 100644 --- a/debug.py +++ b/debug.py @@ -67,7 +67,11 @@ def go(app, n=0, verbose=True): def go_dept(app, dept, verbose=True): objs = app.ScoDoc.objectValues("Folder") for o in objs: - context = o.Scolarite + try: + context = o.Scolarite + except AttributeError: + # ignore other folders, like old "icons" + continue if context.DeptId() == dept: if verbose: print("context in dept ", context.DeptId())