So, on CentOS 6.x, I get the following warning when trying to use check_twill:

[jmorgan@in1c6ut002:~]$ /usr/lib64/nagios/plugins/check_twill
/usr/lib/python2.6/site-packages/twill/other_packages/_mechanize_dist/ DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import re, base64, urlparse, posixpath, hashlib, sha, sys, copy

Sorry, check_twill requires 1 option

check_twill 1.2 (twill version 0.9)

This plugin executes a twill script and returns results for Nagios.
It is designed to be a simple method to funtionally test websites.

(see for more info on writing twill scripts)

Usage: check_twill [-f|-v] 

 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -f, --file
    Path to twill script
 -v, --verbose
    Shows details for command-line debugging (Nagios may truncate)

 $ check_twill -f /tmp/
 PAGE CHECK OK - All tests passed successfully  |available=1 totalTime=0.308099

 $ check_twill -f /tmp/
 PAGE CHECK CRITICAL - Failed on [code is 404 != 200 ] on line 2 at \ |available=0 totalTime=0.784899

The proper fix is to change line 14 of /usr/lib/python2.6/site-packages/twill/other_packages/_mechanize_dist/ to replace “md5, sha” with hashlib:

import re, base64, urlparse, posixpath, hashlib, sys, copy

Adding this here so I can find it later. I should probably file a bug report with rpmforge.