[Twisted-Python] Twisted 1.0.4 - Possible typo in twisted.web.vhost ?
Brian Warner
warner at lothar.com
Tue Apr 29 14:36:27 MDT 2003
pinard at iro.umontreal.ca (François Pinard) writes:
> return self.hosts.get(host, self.default or error.NoResource("host %s not in vhost map" % repr(host)))
> Could it be (?) that this line should be written:
> return (self.hosts.get(host, self.default)
> or error.NoResource("host %s not in vhost map" % repr(host)))
The two are actually logically the same, but I prefer yours because it puts
off the creation of the NoResource error until it is really necessary. Fixed
in CVS.
thanks,
-Brian
More information about the Twisted-Python
mailing list