def check_string_length(value, name, min_length=0, max_length=None, allow_all_spaces=True):
 try:
  strutils.check_string_length(value, name=name, min_length=min_length, max_length=max_length)
 except (ValueError, TypeError) as exc:
  raise exception.InvalidInput(reason=exc)
 if ((not allow_all_spaces) and value.isspace()):
  msg = _('%(name)s cannot be all spaces.')
  raise exception.InvalidInput(reason=msg)

def check_string_length ( value , name , min_length = 0 , max_length = None , allow_all_spaces = True ) : try : strutils . check_string_length ( value , name = name , min_length = min_length , max_length = max_length ) except ( ValueError , TypeError ) as exc : raise exception . InvalidInput ( reason = exc ) if ( ( not allow_all_spaces ) and value . isspace ( ) ) : msg = _ ( '%(name)s cannot be all spaces.' ) raise exception . InvalidInput ( reason = msg )
check the length of specified string .