def u2ver(self):
        """
        Get the major/minor version of the urllib2 lib.

        @return: The urllib2 version.
        @rtype: float

        """
        try:
            part = urllib2.__version__.split('.', 1)
            return float('.'.join(part))
        except Exception, e:
            log.exception(e)
            return 0
def u2ver ( self ) : try : part = urllib2 . __version__ . split ( '.' , 1 ) return float ( '.' . join ( part ) ) except Exception , e : log . exception ( e ) return 0
Get the major/minor version of the urllib2 lib.

        @return: The urllib2 version.
        @rtype: float