except ImportError:\r
fail("qwebirc requires twisted (at least 8.2.0), see http://twistedmatrix.com/")\r
\r
- twisted_fail = lambda x, y=None: fail("you don't seem to have twisted's %s module." % x,\r
- "your distro is most likely modular, look for a twisted web package%s." % (" %s" % y if y else "",))\r
+ def twisted_fail(x, y=None):\r
+ fail("you don't seem to have twisted's %s module." % x,\r
+ "your distro is most likely modular, look for a twisted %s package%s." % (x, " %s" % y if y else "",))\r
\r
try:\r
import twisted.names\r
import twisted.mail\r
except ImportError:\r
twisted_fail("mail")\r
- fail("you don't seem to have twisted's mail module, your distro is most likely modular, look for a twisted mail package.")\r
\r
try:\r
import twisted.web\r
try:\r
import twisted.words\r
except ImportError:\r
- twistedfail("words")\r
+ twisted_fail("words")\r
\r
if __name__ == "__main__":\r
import dependencies\r