提交 4650bec7 编写于 作者: C Cleber Rosa

API review: move avocado.linux.distro to avocado.utils.distro

This is a utility module with no dependency on any other Avocado
module, so a good candidate for the utils namespace.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 08810698
...@@ -22,7 +22,7 @@ from avocado.core import exit_codes ...@@ -22,7 +22,7 @@ from avocado.core import exit_codes
from avocado.core.plugins import plugin from avocado.core.plugins import plugin
from avocado.utils import process from avocado.utils import process
from avocado.utils import path as utils_path from avocado.utils import path as utils_path
from avocado.linux import distro as distro_utils from avocado.utils import distro as utils_distro
class SoftwarePackage(object): class SoftwarePackage(object):
...@@ -55,7 +55,7 @@ class SoftwarePackage(object): ...@@ -55,7 +55,7 @@ class SoftwarePackage(object):
return json.dumps(self.to_dict()) return json.dumps(self.to_dict())
class DistroDef(distro_utils.LinuxDistro): class DistroDef(utils_distro.LinuxDistro):
""" """
More complete information on a given Linux Distribution More complete information on a given Linux Distribution
...@@ -373,7 +373,7 @@ class DistroOptions(plugin.Plugin): ...@@ -373,7 +373,7 @@ class DistroOptions(plugin.Plugin):
msg=('Distro information saved ' msg=('Distro information saved '
'to "%s"' % output_file_name)) 'to "%s"' % output_file_name))
else: else:
detected = distro_utils.detect() detected = utils_distro.detect()
msg = 'Detected distribution: %s (%s) version %s release %s' % ( msg = 'Detected distribution: %s (%s) version %s release %s' % (
detected.name, detected.name,
detected.arch, detected.arch,
......
...@@ -48,7 +48,7 @@ except ImportError: ...@@ -48,7 +48,7 @@ except ImportError:
from avocado.utils import process from avocado.utils import process
from avocado.utils import data_factory from avocado.utils import data_factory
from avocado.linux import distro from avocado.utils import distro
from avocado.core import exceptions from avocado.core import exceptions
from avocado.utils import path as utils_path from avocado.utils import path as utils_path
......
...@@ -13,7 +13,7 @@ if os.path.isdir(os.path.join(basedir, 'avocado')): ...@@ -13,7 +13,7 @@ if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.append(basedir) sys.path.append(basedir)
from avocado.linux import distro from avocado.utils import distro
class ProbeTest(unittest.TestCase): class ProbeTest(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册