From 07565b2e7b93347f1daef69a3e387d7d3e6bda84 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Fri, 22 Sep 2017 17:45:05 +0200 Subject: [PATCH] At least 1 FILE is required --- copyright/insert_copyright | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/copyright/insert_copyright b/copyright/insert_copyright index 87a44b2..6f70a36 100755 --- a/copyright/insert_copyright +++ b/copyright/insert_copyright @@ -327,7 +327,7 @@ def main(): dest="format", default=file_format, help=help_string.format(file_format=file_format, choices="|".join(formats()))) - parser.add_argument('files', nargs='*') + parser.add_argument('files', nargs='+', metavar='FILE') args = parser.parse_args(sys.argv[1:]) @@ -336,9 +336,6 @@ def main(): file_format = args.format files = args.files - if not files: - error_exit('file is not specified') - for filename in files: insert_copyright(filename, owner, year, file_format) -- 2.39.2