--- /usr/lib/python2.4/site-packages/pygtk.py	2006-01-09 12:06:00.000000000 -0600
+++ pygtk.py	2006-05-12 13:43:08.000000000 -0500
@@ -30,6 +30,10 @@
 
 _pygtk_required_version = None
 
+class RequiredVersionError(ValueError, AssertionError):
+    # AssertionError is subclassed for compatibility reasons.
+    pass
+
 def _get_available_versions():
     versions = {}
     for dir in sys.path:
@@ -62,16 +66,20 @@
     global _pygtk_required_version
 
     if _pygtk_required_version != None:
-        assert _pygtk_required_version == version, \
-               "a different version of gtk was already required"
-        return
-
-    assert not sys.modules.has_key('gtk'), \
-           "pygtk.require() must be called before importing gtk"
+        if _pygtk_required_version != version:
+            raise RequiredVersionError(
+                "a different version of gtk was already required")
+        else:
+            return
+
+    if sys.modules.has_key('gtk'):
+        raise RequiredVersionError(
+            "pygtk.require() must be called before importing gtk")
 
     versions = _get_available_versions()
-    assert versions.has_key(version), \
-           "required version '%s' not found on system" % version
+    if not versions.has_key(version):
+        raise RequiredVersionError(
+            "required version '%s' not found on system" % version)
 
     # remove any pygtk dirs first ...
     for dir in sys.path:
