Skip to content

mgr/volumes/nfs: Reorder imports#35739

Merged
batrick merged 1 commit intoceph:masterfrom
varshar16:wip-nfs-fix-import-rados-error
Jun 24, 2020
Merged

mgr/volumes/nfs: Reorder imports#35739
batrick merged 1 commit intoceph:masterfrom
varshar16:wip-nfs-fix-import-rados-error

Conversation

@varshar16
Copy link
Contributor

This patch fixes "ImportError: cannot import name 'TimedOut'"

Signed-off-by: Varsha Rao varao@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@varshar16 varshar16 added the cephfs Ceph File System label Jun 24, 2020
@varshar16 varshar16 requested review from batrick and tchaikov June 24, 2020 07:18
@varshar16 varshar16 force-pushed the wip-nfs-fix-import-rados-error branch from c7b7a1b to 398f08a Compare June 24, 2020 10:11
@sebastian-philipp
Copy link
Contributor

to increase readability, I'd personally prefer to have the imports ordered by:

  1. import from the std lib. (e.g. errno, logging)
  2. import 3rd party libraries (non in this case)
  3. import ceph libraries (e.g. rados, ceph.deployment.service_spec)
  4. import form the current package (e.g. orchestrator
  5. relative import form the current package (e.g. .fs_util)

e.g.

import errno
import json
import logging

from ceph.deployment.service_spec import NFSServiceSpec, PlacementSpec
from rados import TimedOut

import orchestrator

from .fs_util import create_pool

This patch reorders import to fix "ImportError: cannot import name 'TimedOut'".
As flake8 requires similar import types to be grouped together.

Signed-off-by: Varsha Rao <varao@redhat.com>
@varshar16 varshar16 force-pushed the wip-nfs-fix-import-rados-error branch from 398f08a to c87050c Compare June 24, 2020 10:28
@varshar16
Copy link
Contributor Author

jenkins retest this please

@batrick batrick merged commit d4fb198 into ceph:master Jun 24, 2020
@varshar16 varshar16 deleted the wip-nfs-fix-import-rados-error branch June 26, 2020 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants