2014-05-07 05:09:02 |
Steve Martinelli |
description |
(openstack) console log show bf871e90-0850-4f1d-a770-3126c1beb560
ERROR: cliff.app unsupported operand type(s) for +: 'NoneType' and 'int'
parser.add_argument(
'--lines',
metavar='<num-lines>',
type=int,
default=None,
help='Number of lines to display from the end of the log '
'(default=all)',
)
without --lines option, we should retrieve all log for the server |
Error seen:
(openstack) console log show bf871e90-0850-4f1d-a770-3126c1beb560
ERROR: cliff.app unsupported operand type(s) for +: 'NoneType' and 'int'
Reason:
The parser defaults the lines variable to None.
parser.add_argument(
'--lines',
metavar='<num-lines>',
type=int,
default=None,
help='Number of lines to display from the end of the log '
'(default=all)',
)
However we end up trying to add an int value of 1 in some cases.
data = server.get_console_output(length=parsed_args.lines + 1) |
|