]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: fix import error in tasks/swift.py 28605/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 17 Jun 2019 15:54:36 +0000 (11:54 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 17 Jun 2019 19:07:40 +0000 (15:07 -0400)
> ImportError: No module named packaging

replaces packaging.version.Version with distutils.version.LooseVersion

Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/tasks/swift.py

index ef3027a70601ef319d06c7c7e3c2069861eea5ca..00d4de4c0a4e37faa984e27ef85cd2a6eb95dc12 100644 (file)
@@ -8,7 +8,7 @@ import contextlib
 import logging
 import os
 
-from packaging import version
+from distutils.version import LooseVersion
 from teuthology import misc as teuthology
 from teuthology import contextutil
 from teuthology.config import config as teuth_config
@@ -241,8 +241,7 @@ def task(ctx, config):
 
         # http://tracker.ceph.com/issues/40304 can't bootstrap on rhel 7.6+
         (remote,) = ctx.cluster.only(client).remotes.keys()
-        os_version = version.parse(remote.os.version):
-        if remote.os.type == 'rhel' and os_version >= version.Version('7.6'):
+        if remote.os.name == 'rhel' and LooseVersion(remote.os.version) >= LooseVersion('7.6'):
             log.warning('Swift tests cannot run on rhel 7.6+, skipping client {client}'.format(client))
             continue