Skip to content

Commit

Permalink
fix lint test, whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Aug 14, 2023
1 parent 4eaf2b9 commit 3d760d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Products/CMFCore/DirectoryView.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ def listDirectories(self):
registerMetaType = _dirreg.registerMetaType


def listFolderHierarchy(ob, path, rval, adding_meta_type=None, max=0, c = 0):
def listFolderHierarchy(ob, path, rval, adding_meta_type=None, max=0, c=0):
if not hasattr(ob, 'objectValues'):
return
for subob in ob.objectValues():
c+=1
c += 1
base = getattr(subob, 'aq_base', subob)
if getattr(base, 'isPrincipiaFolderish', 0):

Expand All @@ -386,11 +386,11 @@ def listFolderHierarchy(ob, path, rval, adding_meta_type=None, max=0, c = 0):
subpath = subob.getId()
title = getattr(subob, 'title', None)
if title:
title = re.sub(r'^(.{48}).*$', '\g<1>...', str(title))
title = re.sub(r'^(.{48}).*$', '\\g<1>...', str(title))
name = f'{subpath} ({title})'
else:
name = subpath
if max==0 or c <= max:
if max == 0 or c <= max:
rval.append((subpath, name))
listFolderHierarchy(subob, subpath, rval, adding_meta_type, max, c)

Expand Down

0 comments on commit 3d760d7

Please sign in to comment.