diff --git a/lib/extras.py b/lib/extras.py
index 1a4b730..a36faa8 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -427,65 +427,56 @@ class MinTimeLoggingCursor(LoggingCursor):
 
 # a dbtype and adapter for Python UUID type
 
-try:
-    import uuid
+class UUID_adapter(object):
+    """Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__.
 
-    class UUID_adapter(object):
-        """Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__.
+    .. __: http://docs.python.org/library/uuid.html
+    .. __: http://www.postgresql.org/docs/8.4/static/datatype-uuid.html
+    """
 
-        .. __: http://docs.python.org/library/uuid.html
-        .. __: http://www.postgresql.org/docs/8.4/static/datatype-uuid.html
-        """
-        
-        def __init__(self, uuid):
-            self._uuid = uuid
-    
-        def prepare(self, conn):
-            pass
-        
-        def getquoted(self):
-            return "'"+str(self._uuid)+"'::uuid"
-            
-        __str__ = getquoted
-
-    def register_uuid(oids=None, conn_or_curs=None):
-        """Create the UUID type and an uuid.UUID adapter."""
-        if not oids:
-            oid1 = 2950
-            oid2 = 2951
-        elif type(oids) == list:
-            oid1, oid2 = oids
-        else:
-            oid1 = oids
-            oid2 = 2951
-
-        def parseUUIDARRAY(data, cursor):
-            if data is None:
-                return None
-            elif data == '{}':
-                return []
-            else:
-                return [((len(x) > 0 and x != 'NULL') and uuid.UUID(x) or None)
-                        for x in data[1:-1].split(',')]
+    def __init__(self, uuid):
+        self._uuid = uuid
+
+    def prepare(self, conn):
+        pass
+
+    def getquoted(self):
+        return "'"+str(self._uuid)+"'::uuid"
 
-        _ext.UUID = _ext.new_type((oid1, ), "UUID",
-                lambda data, cursor: data and uuid.UUID(data) or None)
-        _ext.UUIDARRAY = _ext.new_type((oid2,), "UUID[]", parseUUIDARRAY)
+    __str__ = getquoted
 
-        _ext.register_type(_ext.UUID, conn_or_curs)
-        _ext.register_type(_ext.UUIDARRAY, conn_or_curs)
-        _ext.register_adapter(uuid.UUID, UUID_adapter)
+def register_uuid(oids=None, conn_or_curs=None):
+    """Create the UUID type and an uuid.UUID adapter."""
 
-        return _ext.UUID
+    import uuid
 
-except ImportError, e:
-    def register_uuid(oid=None):
-        """Create the UUID type and an uuid.UUID adapter.
+    if not oids:
+        oid1 = 2950
+        oid2 = 2951
+    elif type(oids) == list:
+        oid1, oid2 = oids
+    else:
+        oid1 = oids
+        oid2 = 2951
 
-        This is a fake function that will always raise an error because the
-        import of the uuid module failed.
-        """
-        raise e
+    def parseUUIDARRAY(data, cursor):
+        if data is None:
+            return None
+        elif data == '{}':
+            return []
+        else:
+            return [((len(x) > 0 and x != 'NULL') and uuid.UUID(x) or None)
+                    for x in data[1:-1].split(',')]
+
+    _ext.UUID = _ext.new_type((oid1, ), "UUID",
+            lambda data, cursor: data and uuid.UUID(data) or None)
+    _ext.UUIDARRAY = _ext.new_type((oid2,), "UUID[]", parseUUIDARRAY)
+
+    _ext.register_type(_ext.UUID, conn_or_curs)
+    _ext.register_type(_ext.UUIDARRAY, conn_or_curs)
+    _ext.register_adapter(uuid.UUID, UUID_adapter)
+
+    return _ext.UUID
 
 
 # a type, dbtype and adapter for PostgreSQL inet type