- Bug #981530: Fix UnboundLocalError in shutil.rmtree().  This affects
  the documented behavior: the function passed to the onerror()
  handler can now also be os.listdir.

[I could've sworn I checked this in, but apparently I didn't, or it
got lost???]
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 05f34d8..bcae72f 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -13,6 +13,7 @@
         filename = tempfile.mktemp()
         self.assertRaises(OSError, shutil.rmtree, filename)
         self.assertEqual(shutil.rmtree(filename, True), None)
+        shutil.rmtree(filename, False, lambda func, arg, exc: None)
 
     def test_dont_move_dir_in_itself(self):
         src_dir = tempfile.mkdtemp()