rewriter: Removed python 3.7 feature required=False

pull/4992/head
Daniel Mensinger 6 years ago
parent 9874ce81f0
commit 8fad06e8c8
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 7
      mesonbuild/rewriter.py

@ -36,7 +36,7 @@ class RewriterException(MesonException):
def add_arguments(parser, formater=None):
parser.add_argument('--sourcedir', type=str, default='.', metavar='SRCDIR', help='Path to source directory.')
subparsers = parser.add_subparsers(dest='type', required=True, title='Rewriter commands', description='Rewrite command to execute')
subparsers = parser.add_subparsers(dest='type', title='Rewriter commands', description='Rewrite command to execute')
# Target
tgt_parser = subparsers.add_parser('target', aliases=['tgt'], help='Modify a target', formatter_class=formater)
@ -899,6 +899,11 @@ cli_type_map = {
def run(options):
rewriter = Rewriter(options.sourcedir)
rewriter.analyze_meson()
if options.type is None:
print('No command specified')
return 1
commands = cli_type_map[options.type](options)
if not isinstance(commands, list):

Loading…
Cancel
Save