def _validate_profile(self, profile): # Backwards compatible with v4 profiles v4_to_v5_profiles = { 'mapbox.driving': 'mapbox/driving', 'mapbox.cycling': 'mapbox/cycling', 'mapbox.walking': 'mapbox/walking'} if profile in v4_to_v5_profiles: profile = v4_to_v5_profiles[profile] warnings.warn('Converting v4 profile to v5, use {} instead'.format(profile), errors.MapboxDeprecationWarning) if profile not in self.valid_profiles: raise errors.InvalidProfileError( "{0} is not a valid profile".format(profile)) return profile
def _validate_profile(self, profile): if profile not in self.valid_profiles: raise errors.InvalidProfileError( "{0} is not a valid profile".format(profile)) return profile