Skip to content

Commit

Permalink
qa/rgw: fix import error in tasks/swift.py
Browse files Browse the repository at this point in the history
> ImportError: No module named packaging

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2dd5574)
  • Loading branch information
cbodley committed Jun 17, 2019
1 parent 55c1d24 commit 315141a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions qa/tasks/swift.py
Expand Up @@ -8,7 +8,7 @@
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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 315141a

Please sign in to comment.