Tidy up some long lines

This commit is contained in:
Maxim Kulkin 2013-10-31 17:27:06 +04:00
parent 77795ede3e
commit 95b26fe067
3 changed files with 6 additions and 12 deletions

View File

@ -610,8 +610,7 @@ class OpenstackDiscovery(object):
config_locations_result = client.run( config_locations_result = client.run(
['bash', '-c', ['bash', '-c',
'mysqld --help --verbose ' 'mysqld --help --verbose '
'| grep "Default options are read from the following files in ' '| grep "Default options are read from" -A 1'])
'the given order" -A 1'])
config_locations = config_locations_result.output.strip().split( config_locations = config_locations_result.output.strip().split(
"\n")[-1].split() "\n")[-1].split()
for path in config_locations: for path in config_locations:

View File

@ -244,11 +244,11 @@ class OpenstackComponent(Service):
if isinstance(type_validation_result, Issue): if isinstance(type_validation_result, Issue):
type_validation_result.mark = parameter\ type_validation_result.mark = parameter\
.value.start_mark.merge( .value.start_mark.merge(
type_validation_result.mark) type_validation_result.mark)
type_validation_result.message = \ type_validation_result.message = \
'Property "%s" in section "%s": %s' % ( 'Property "%s" in section "%s": %s' % (
parameter.name.text, section_name, parameter.name.text, section_name,
type_validation_result.message) type_validation_result.message)
report_issue(type_validation_result) report_issue(type_validation_result)
config.set( config.set(

View File

@ -200,13 +200,8 @@ class SchemaIssue(Issue):
class InvalidValueError(MarkedIssue): class InvalidValueError(MarkedIssue):
def __init__(self, message, mark=Mark('', 0, 0)): def __init__(self, message, mark=Mark('', 0, 0)):
super( super(InvalidValueError,self).__init__(
InvalidValueError, Issue.ERROR, 'Invalid value: ' + message, mark)
self).__init__(
Issue.ERROR,
'Invalid value: ' +
message,
mark)
class TypeValidator(object): class TypeValidator(object):