def _validate_container(api_ver, account, container): validate_api_version(api_ver) if not account_name_is_valid(account): msg = 'Account name %s is invalid' % account raise bottle.HTTPError(400, msg) if not container_name_is_valid(container): msg = 'Container name %s is invalid' % container raise bottle.HTTPError(400, msg)
def _validate_account(api_ver, account): validate_api_version(api_ver) if not account_name_is_valid(account): msg = 'Account name %s is invalid' % account raise bottle.HTTPError(400, msg)