Changeset 1485
- Timestamp:
- 12/09/06 13:08:43
- Files:
-
- branches/cherrypy-2.x/cherrypy/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-2.x/cherrypy/__init__.py
r1484 r1485 40 40 41 41 def __getattr__(self, name): 42 childobject = getattr(serving, self.__attrname__) 42 try: 43 childobject = getattr(serving, self.__attrname__) 44 except AttributeError: 45 raise AttributeError("cherrypy.%s has no properties outside of " 46 "an HTTP request." % self.__attrname__) 43 47 return getattr(childobject, name) 44 48 45 49 def __setattr__(self, name, value): 46 childobject = getattr(serving, self.__attrname__) 50 try: 51 childobject = getattr(serving, self.__attrname__) 52 except AttributeError: 53 raise AttributeError("cherrypy.%s has no properties outside of " 54 "an HTTP request." % self.__attrname__) 47 55 setattr(childobject, name, value) 48 56 49 57 def __delattr__(self, name): 50 childobject = getattr(serving, self.__attrname__) 58 try: 59 childobject = getattr(serving, self.__attrname__) 60 except AttributeError: 61 raise AttributeError("cherrypy.%s has no properties outside of " 62 "an HTTP request." % self.__attrname__) 51 63 delattr(childobject, name) 52 64

