Changeset 6553 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 24 Jul 2011, 02:53:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
r6542 r6553 240 240 return os.path.basename(csv_path) 241 241 242 def search(self, searchterm, searchtype):243 if searchtype == 'serial':244 if len(self._entries) < searchterm + 1:245 return []246 return [self._entries[searchterm]]247 if searchtype == 'pin':248 try:249 entry = self.getAccessCode(searchterm)250 return [entry]251 except KeyError:252 return []253 254 242 @grok.subscribe(IAccessCodeBatch, grok.IObjectAddedEvent) 255 243 def handle_batch_added(batch, event):
Note: See TracChangeset for help on using the changeset viewer.