diff options
author | Sage Weil <sage@inktank.com> | 2013-07-27 07:33:21 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-27 07:33:21 -0700 |
commit | b5250fdc70119408b102091229ba8e10fa0b1446 (patch) | |
tree | 4db46c98064de123f4b4bf1a4f32b96b106a5a7a | |
parent | bd0e35f2e198b7a0683e185e4969a26488be8386 (diff) | |
parent | 09ee092ffd09de85e3b813c7595e1f818c49c385 (diff) | |
download | ceph-b5250fdc70119408b102091229ba8e10fa0b1446.tar.gz |
Merge pull request #471 from dalgaaf/wip-da-fix-pylint
Cleanup minor issues from pylint
Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/pybind/ceph_argparse.py | 12 | ||||
-rwxr-xr-x | src/pybind/ceph_rest_api.py | 2 | ||||
-rw-r--r-- | src/pybind/cephfs.py | 4 | ||||
-rw-r--r-- | src/pybind/rados.py | 2 | ||||
-rw-r--r-- | src/pybind/rbd.py | 2 |
5 files changed, 10 insertions, 12 deletions
diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index ee71b76d6a1..55069d47be2 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -894,9 +894,9 @@ def find_cmd_target(childargs): right daemon. Returns ('osd', osdid), ('pg', pgid), or ('mon', '') """ - sig = parse_funcsig(['tell', {'name':'target','type':'CephName'}]) + sig = parse_funcsig(['tell', {'name':'target', 'type':'CephName'}]) try: - valid_dict = validate(childargs, sig, partial=True); + valid_dict = validate(childargs, sig, partial=True) except ArgumentError: pass else: @@ -908,9 +908,9 @@ def find_cmd_target(childargs): name.valid(valid_dict['target']) return name.nametype, name.nameid - sig = parse_funcsig(['tell', {'name':'pgid','type':'CephPgid'}]) + sig = parse_funcsig(['tell', {'name':'pgid', 'type':'CephPgid'}]) try: - valid_dict = validate(childargs, sig, partial=True); + valid_dict = validate(childargs, sig, partial=True) except ArgumentError: pass else: @@ -918,9 +918,9 @@ def find_cmd_target(childargs): # pg doesn't need revalidation; the string is fine return 'pg', valid_dict['pgid'] - sig = parse_funcsig(['pg', {'name':'pgid','type':'CephPgid'}]) + sig = parse_funcsig(['pg', {'name':'pgid', 'type':'CephPgid'}]) try: - valid_dict = validate(childargs, sig, partial=True); + valid_dict = validate(childargs, sig, partial=True) except ArgumentError: pass else: diff --git a/src/pybind/ceph_rest_api.py b/src/pybind/ceph_rest_api.py index 9e53eba05fd..59e3f60a3a7 100755 --- a/src/pybind/ceph_rest_api.py +++ b/src/pybind/ceph_rest_api.py @@ -219,7 +219,7 @@ def generate_url_and_params(app, sig, flavor): desc.req and \ not str(desc.instance).startswith('--') and \ not params: - url += '/' + str(desc.instance) + url += '/' + str(desc.instance) else: # tell/<target> is a weird case; the URL includes what # would everywhere else be a parameter diff --git a/src/pybind/cephfs.py b/src/pybind/cephfs.py index f89f53fb194..80b7e4b773f 100644 --- a/src/pybind/cephfs.py +++ b/src/pybind/cephfs.py @@ -2,9 +2,7 @@ This module is a thin wrapper around libcephfs. """ from ctypes import CDLL, c_char_p, c_size_t, c_void_p, c_int, c_long, c_uint, c_ulong, \ - create_string_buffer, byref, Structure, c_uint64, c_ubyte, pointer, \ - CFUNCTYPE -import ctypes + create_string_buffer, byref, Structure import errno class Error(Exception): diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 040009271cb..e543ff79305 100644 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -278,7 +278,7 @@ Rados object in state %s." % (self.state)) ret = run_in_thread(self.librados.rados_conf_parse_argv_remainder, (self.cluster, len(args), cargs, cretargs)) if ret: - raise make_ex(ret, "error calling conf_parse_argv_remainder") + raise make_ex(ret, "error calling conf_parse_argv_remainder") # cretargs was allocated with fixed length; collapse return # list to eliminate any missing args diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py index 9d71738e728..6e9ca8a2252 100644 --- a/src/pybind/rbd.py +++ b/src/pybind/rbd.py @@ -17,7 +17,7 @@ methods, a :class:`TypeError` will be raised. # Copyright 2011 Josh Durgin from ctypes import CDLL, c_char, c_char_p, c_size_t, c_void_p, c_int, \ create_string_buffer, byref, Structure, c_uint64, c_int64, c_uint8, \ - CFUNCTYPE, pointer + CFUNCTYPE import ctypes import errno |