def ParseTotalStorageLimit(limit):
 limit = limit.strip()
 if (not limit):
  raise MalformedQueueConfiguration('Total Storage Limit must not be empty.')
 try:
  if (limit[(-1)] in BYTE_SUFFIXES):
   number = float(limit[0:(-1)])
   for c in BYTE_SUFFIXES:
    if (limit[(-1)] != c):
     number = (number * 1024)
    else:
     return int(number)
  else:
   return int(limit)
 except ValueError:
  raise MalformedQueueConfiguration(('Total Storage Limit "%s" is invalid.' % limit))

def ParseTotalStorageLimit ( limit ) : limit = limit . strip ( ) if ( not limit ) : raise MalformedQueueConfiguration ( 'Total Storage Limit must not be empty.' ) try : if ( limit [ ( - 1 ) ] in BYTE_SUFFIXES ) : number = float ( limit [ 0 : ( - 1 ) ] ) for c in BYTE_SUFFIXES : if ( limit [ ( - 1 ) ] != c ) : number = ( number * 1024 ) else : return int ( number ) else : return int ( limit ) except ValueError : raise MalformedQueueConfiguration ( ( 'Total Storage Limit "%s" is invalid.' % limit ) )
parses a string representing the storage bytes limit .