Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 445

Show
Ignore:
Timestamp:
07/10/05 23:01:30
Author:
mikerobi
Message:

basesessiondict raises NotImplementedError? instead of quitely doing nothing, if the subclass does not have the method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/filter/sessionfilter/basesessiondict.py

    r444 r445  
    3030from cherrypy.lib.filter.sessionfilter.sessionerrors import SessionImmutableError 
    3131 
     32from exceptions import NotImplementedError 
    3233 
    3334# this is a dictionary like class that will be exposed to the application 
     
    5455        pass 
    5556     
    56     def __eq__(self, sessionDict): 
    57         pass  
    58          
    5957    def get(self, key, default = None): 
    60         pass 
     58        raise NotImplementedError() 
    6159         
    6260    def __getitem__(self, key): 
    63         pass  
     61        raise NotImplementedError() 
    6462      
    6563    def __setitem__(self, key, value): 
    66         pass  
     64        raise NotImplementedError() 
    6765 
    6866    def __getattr__(self, attr): 
    69         pass  
     67        raise NotImplementedError() 
    7068     
    7169    def __setattr__(self, attr, value): 
    72         pass 
     70        raise NotImplementedError() 
    7371 
    7472    def setdefault(self, key, default): 
    75         pass 
     73        raise NotImplementedError() 
    7674 
    7775    # needed for conversion to a dict 
    7876    def __iter__(self): 
    79         pass 
     77        raise NotImplementedError() 
    8078     
    8179    def expired(self): 
     
    8482        return (now - self.lastAccess) > self.timeout 
    8583     
    86     # additional functions 
     84    # additional functions may/may not be necessary 
    8785    ''' 
    8886    def __getstate__(self): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets