mirror of https://github.com/apache/cassandra
Cleanup whitespace for cqlsh PEP8 compliance
patch by philipthompson; reviewed by Stefania for CASSANDRA-10455
This commit is contained in:
parent
2084f3fb19
commit
22099addaf
|
|
@ -2554,9 +2554,10 @@ class SwitchCommand(object):
|
|||
print 'Disabled %s.' % (self.description,)
|
||||
return False
|
||||
|
||||
|
||||
class SwitchCommandWithValue(SwitchCommand):
|
||||
"""The same as SwitchCommand except it also accepts a value in place of ON.
|
||||
|
||||
|
||||
This returns a tuple of the form: (SWITCH_VALUE, PASSED_VALUE)
|
||||
eg: PAGING 50 returns (True, 50)
|
||||
PAGING OFF returns (False, None)
|
||||
|
|
@ -2567,7 +2568,7 @@ class SwitchCommandWithValue(SwitchCommand):
|
|||
def __init__(self, command, desc, value_type=int):
|
||||
SwitchCommand.__init__(self, command, desc)
|
||||
self.value_type = value_type
|
||||
|
||||
|
||||
def execute(self, state, parsed, printerr):
|
||||
binary_switch_value = SwitchCommand.execute(self, state, parsed, printerr)
|
||||
switch = parsed.get_binding('switch')
|
||||
|
|
@ -2578,6 +2579,7 @@ class SwitchCommandWithValue(SwitchCommand):
|
|||
value = None
|
||||
return (binary_switch_value, value)
|
||||
|
||||
|
||||
def option_with_default(cparser_getter, section, option, default=None):
|
||||
try:
|
||||
return cparser_getter(section, option)
|
||||
|
|
|
|||
Loading…
Reference in New Issue