Changeset 1739
- Timestamp:
- 10/08/07 17:51:12
- Files:
-
- trunk/cherrypy/__init__.py (modified) (2 diffs)
- trunk/cherrypy/restsrv/plugins.py (modified) (1 diff)
- trunk/cherrypy/test/test_session.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/__init__.py
r1720 r1739 113 113 2. __metaclass__ can be specified at the module global level 114 114 for classic classes. 115 116 For various formatting reasons, you should write multiline docs 117 with a leading newline and not a trailing one: 118 119 response__doc = """ 120 The response object for the current thread. In the main thread, 121 and any threads which are not HTTP requests, this is None.""" 115 122 116 123 The type of the attribute is intentionally not included, because … … 457 464 458 465 if script_name is None: 459 script_name = request. app.script_name466 script_name = request.script_name 460 467 if base is None: 461 468 base = request.base trunk/cherrypy/restsrv/plugins.py
r1690 r1739 229 229 230 230 # See http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 231 # (or http://www.faqs.org/faqs/unix-faq/programmer/faq/ section 1.7) 231 232 # and http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 232 233 trunk/cherrypy/test/test_session.py
r1736 r1739 207 207 try: 208 208 import memcache 209 except ImportError: 210 pass 209 import socket 210 211 host, port = '127.0.0.1', 11211 212 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, 213 socket.SOCK_STREAM): 214 af, socktype, proto, canonname, sa = res 215 s = None 216 try: 217 s = socket.socket(af, socktype, proto) 218 # See http://groups.google.com/group/cherrypy-users/ 219 # browse_frm/thread/bbfe5eb39c904fe0 220 s.settimeout(1.0) 221 s.connect((host, port)) 222 s.close() 223 except socket.error: 224 if s: 225 s.close() 226 raise 227 break 228 except (ImportError, socket.error): 229 class MemcachedSessionTest(helper.CPWebCase): 230 231 def test(self): 232 print "skipped", 211 233 else: 212 234 class MemcachedSessionTest(helper.CPWebCase):

