(self, rev)
Get a valid revision (non negative numeric and less or equal than 65535).

    Args:
      rev: revision number
    Returns:
      A valid revision number.
Get a valid revision (non negative numeric and less or equal than 65535).
Get a valid revision ( non negative numeric and less or equal than 65535 ) .
def _GetValidRevision(self, rev):
    """Get a valid revision (non negative numeric and less or equal than 65535).

    Args:
      rev: revision number
    Returns:
      A valid revision number.
    """

    try:
      valid_rev = int(rev)
      if valid_rev > 65535 or valid_rev < 0:
        return 0
      return valid_rev
    except ValueError:
      return 0
def _GetValidRevision ( self , rev ) : try : valid_rev = int ( rev ) if valid_rev > 65535 or valid_rev < 0 : return 0 return valid_rev except ValueError : return 0