Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: ceph-objectstore-tool: should import platform before using it #12038

Merged
merged 1 commit into from Nov 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/ceph_objectstore_tool.py
Expand Up @@ -31,7 +31,7 @@ def check_output(*popenargs, **kwargs):
import logging
import json
import tempfile
import io
import platform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io is definitely not used in this module so +1


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platform is definitely used so another +1

try:
from subprocess import DEVNULL
Expand Down Expand Up @@ -1967,7 +1967,7 @@ def main(argv):

def remove_btrfs_subvolumes(path):
if platform.system() == "FreeBSD":
return
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing trailing whitespace is always good.

result = subprocess.Popen("stat -f -c '%%T' %s" % path, shell=True, stdout=subprocess.PIPE)
for line in result.stdout:
filesystem = decode(line).rstrip('\n')
Expand Down