'Dotted -> tuple of numerics OID converter'

def prettyIn(self, value):

    if isinstance(value, tuple):
        pass
    elif isinstance(value, ObjectIdentifier):
        return tuple(value)
    elif octets.isStringType(value):
        r = []
        for element in [x for x in value.split('.') if (x != '')]:
            try:
                r.append(int(element, 0))
            except ValueError:
                raise error.PyAsn1Error(('Malformed    Object    ID    %s    at    %s:    %s' % (str(value), self.__class__.__name__, sys.exc_info()[1])))
        value = tuple(r)
    else:
        try:
            value = tuple(value)
        except TypeError:
            raise error.PyAsn1Error(('Malformed    Object    ID    %s    at    %s:    %s' % (str(value), self.__class__.__name__, sys.exc_info()[1])))
    for x in value:
        if ((not isinstance(x, intTypes)) or (x < 0)):
            raise error.PyAsn1Error(('Invalid    sub-ID    in    %s    at    %s' % (value, self.__class__.__name__)))
    return value
