Changeset 2775 for pykota/trunk
- Timestamp:
- 03/02/06 17:39:29 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r2773 r2775 470 470 if result : 471 471 patterns = billingcodepattern.split(",") 472 try : 473 patdict = {}.fromkeys(patterns) 474 except AttributeError : 475 # Python v2.2 or earlier 476 patdict = {} 477 for p in patterns : 478 patdict[p] = None 472 479 for record in result : 473 480 codename = self.databaseToUserCharset(record["billingcode"]) 474 if self.tool.matchString(codename, patterns) :481 if patdict.has_key(codename) or self.tool.matchString(codename, patterns) : 475 482 code = StorageBillingCode(self, codename) 476 483 code.ident = record.get("id")