]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
packaging: Drop GitbuilderProject._get_codename()
authorZack Cerza <zack@redhat.com>
Fri, 20 May 2016 23:06:07 +0000 (17:06 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 3 Jun 2016 21:02:54 +0000 (15:02 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/packaging.py

index 2ff4ecd972625a6da5e233a823a8cc96471b410b..1325ce5053a56e7348c195cc7dce351823dc0115 100644 (file)
@@ -585,7 +585,7 @@ class GitbuilderProject(object):
             # deb based systems use codename instead of a distro/version combo
             if not codename:
                 # lookup codename based on distro string
-                codename = cls._get_codename(distro, version)
+                codename = OS._version_to_codename(distro, version)
                 if not codename:
                     msg = "No codename found for: {distro} {version}".format(
                         distro=distro,
@@ -600,23 +600,6 @@ class GitbuilderProject(object):
             version=cls._parse_version(version),
         )
 
-    @staticmethod
-    def _get_codename(distro, version):
-        """
-        Attempts to find the codename for a given distro / version
-        pair.  Will first attempt to find the codename for the full
-        version and if not found will look again using only the major
-        version.  If a codename is not found, None is returned.
-
-        The constant DISTRO_CODENAME_MAP is used to provide this mapping.
-
-        :returns: The codename as string or None if not found.
-        """
-        try:
-            return OS._version_to_codename(distro, version)
-        except RuntimeError:
-            pass
-
     def _get_version(self):
         """
         Attempts to find the distro version from the job_config.