Refactor awawy unnecessary lambda to str.upper

This commit is contained in:
Jack Riches 2017-04-02 23:46:44 +01:00
parent ca200b1da7
commit eff1406c09

View File

@ -198,7 +198,7 @@ base_parser.add_argument('-c', '--config',
'(use "-" for stdout)') '(use "-" for stdout)')
base_parser.add_argument('-l', '--log-level', base_parser.add_argument('-l', '--log-level',
type=lambda l: l.upper(), # case insensitive conversion type=str.upper # convert to uppercase for comparison to choices
choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
default='INFO', default='INFO',
help='Log level') help='Log level')