mozilla_version package

Submodules

mozilla_version.balrog module

mozilla_version.gecko module

mozilla_version.version module

mozilla_version.errors module

Defines all errors reported by mozilla-version.

exception mozilla_version.errors.MissingFieldError(version_string, field_name)

Bases: ValueError

Error when version_string lacks an expected field.

Parameters:
  • version_string (str) – The string it was unable to extract a given field.

  • field_name (str) – The name of the missing field.

exception mozilla_version.errors.NoVersionTypeError(version_string)

Bases: ValueError

Error when version_string matched the pattern, but was unable to find its type.

Parameters:

version_string (str) – The string it was unable to guess the type.

exception mozilla_version.errors.PatternNotMatchedError(string, patterns)

Bases: ValueError

Error when a string doesn’t match an expected pattern.

Parameters:
  • string (str) – The string it was unable to match.

  • patterns (sequence) – The patterns it tried to match.

exception mozilla_version.errors.TooManyTypesError(version_string, first_matched_type, second_matched_type)

Bases: ValueError

Error when version_string has too many types.

Parameters:
  • version_string (str) – The string that gave too many types.

  • first_matched_type (str) – The name of the first detected type.

  • second_matched_type (str) – The name of the second detected type