Ticket #1596 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Bad _getEntry call

Reported by: gracinet Owned by: gracinet
Priority: P1 Milestone: CPS 3.4.1
Component: CPSUserFolder Version: 3.4.0
Severity: normal Keywords: directories
Cc:

Description

    *  Module Products.CPSUserFolder.CPSUserFolder, line 548, in getGroupById

TypeError: _getEntry() takes exactly 2 arguments (3 given)

Indeed, the default value is in getEntry interface, not _getEntry

Change History

comment:1 Changed 14 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to worksforme

Cannot reproduce anymore. From what I saw, the default value will never be used anyway, since we are inside a _hasEntry conditonal.

comment:2 Changed 14 years ago by gracinet

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Ok, I confused kwargs and normal args when trying to reproduce in test:

> /Users/zopes/courrier/Products/CPSUserFolder/CPSUserFolder.py(548)getGroupById()
-> group_entry = groups_dir._getEntry(groupname, default)
-> group_entry = groups_dir._getEntry(groupname, default)
(Pdb) 

_getEntry seems to be really necessary here.

comment:3 Changed 14 years ago by gracinet

  • Owner changed from fguillaume to gracinet
  • Status changed from reopened to new
(Pdb) groups_dir._getEntry(groupname, default)
*** TypeError: _getEntry() takes exactly 2 arguments (3 given)

comment:4 Changed 14 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [34936]

Note: See TracTickets for help on using tickets.