Skip to content

Commit

Permalink
Fix tabs->whitespace in ceph_argparse
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh Prypin <oleh@pryp.in>
(cherry picked from commit bef2c83)
  • Loading branch information
oprypin authored and smithfarm committed Jul 24, 2016
1 parent bb2dc95 commit b01af21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/pybind/ceph_argparse.py
Expand Up @@ -1125,14 +1125,14 @@ def __init__(self, target, *args, **kwargs):
self.args = args
self.kwargs = kwargs
self.target = target
self.exception = None
self.exception = None
threading.Thread.__init__(self)

def run(self):
try:
self.retval = self.target(*self.args, **self.kwargs)
except Exception as e:
self.exception = e
self.retval = self.target(*self.args, **self.kwargs)
except Exception as e:
self.exception = e


# time in seconds between each call to t.join() for child thread
Expand Down
20 changes: 10 additions & 10 deletions src/test/pybind/test_ceph_argparse.py
Expand Up @@ -89,11 +89,11 @@ def check_no_arg(self, prefix, command):

class TestBasic:

def test_non_ascii_in_non_options(self):
# unicode() is not able to convert this str parameter into unicode
# using the default encoding 'ascii'. and validate_command() should
# not choke on it.
assert_is_none(validate_command(sigdict, ['章鱼和鱿鱼']))
def test_non_ascii_in_non_options(self):
# unicode() is not able to convert this str parameter into unicode
# using the default encoding 'ascii'. and validate_command() should
# not choke on it.
assert_is_none(validate_command(sigdict, ['章鱼和鱿鱼']))


class TestPG(TestArgparse):
Expand Down Expand Up @@ -638,7 +638,7 @@ def test_crush_rename_bucket(self):
'rename-bucket']))
assert_equal({}, validate_command(sigdict, ['osd', 'crush',
'rename-bucket',
'srcname']))
'srcname']))
assert_equal({}, validate_command(sigdict, ['osd', 'crush',
'rename-bucket', 'srcname',
'dstname',
Expand Down Expand Up @@ -744,7 +744,7 @@ def test_crush_reweight(self):

def test_crush_tunables(self):
for tunable in ('legacy', 'argonaut', 'bobtail', 'firefly',
'optimal', 'default'):
'optimal', 'default'):
self.assert_valid_command(['osd', 'crush', 'tunables',
tunable])
assert_equal({}, validate_command(sigdict, ['osd', 'crush',
Expand Down Expand Up @@ -996,13 +996,13 @@ def test_pool_create(self):
'poolname',
'128', '128',
'erasure', '^^^',
'ruleset']))
'ruleset']))
assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
'poolname',
'128', '128',
'erasure', 'profile',
'ruleset',
'toomany']))
'toomany']))
assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
'poolname',
'128', '128',
Expand Down Expand Up @@ -1102,7 +1102,7 @@ def test_pool_set_quota(self):
def test_reweight_by_utilization(self):
self.assert_valid_command(['osd', 'reweight-by-utilization'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '100'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '100', '.1'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '100', '.1'])
self.assert_valid_command(['osd', 'reweight-by-utilization', '--no-increasing'])
assert_equal({}, validate_command(sigdict, ['osd',
'reweight-by-utilization',
Expand Down

0 comments on commit b01af21

Please sign in to comment.