Show
Ignore:
Timestamp:
04/16/10 02:11:18 (14 years ago)
Author:
jerome
Message:

Improved the retrival of printers and billingcodes as well as
users. References #52. For users groups it will be harder to do, next
time :-)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storage.py

    r3489 r3524  
    542542    def __init__(self, pykotatool) : 
    543543        """Opens the storage connection.""" 
    544         self.closed = 1 
     544        self.closed = True 
    545545        self.tool = pykotatool 
    546546        self.usecache = pykotatool.config.getCaching() 
     
    571571        """Logs a database query, where all queries are already UTF-8 encoded.""" 
    572572        self.tool.logdebug(qmsg.decode("UTF-8", "replace")) 
     573 
     574    def hasWildCards(self, pattern) : 
     575        """Returns True if the pattern contains wildcards, else False.""" 
     576        specialchars = "*?[!" # no need to check for ] since [ would be there first 
     577        for specialchar in specialchars : 
     578            if specialchar in pattern : 
     579                return True 
     580        return False 
    573581 
    574582    def getFromCache(self, cachetype, key) :