update-copyright.py: Use the configured files.authors and files.files
authorW. Trevor King <wking@tremily.us>
Tue, 1 Jan 2013 21:32:44 +0000 (16:32 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 1 Jan 2013 21:48:34 +0000 (16:48 -0500)
Rather than reading them into Project.with_authors and
Project.with_files and then ignoring them.  This means that if you
don't want an AUTHOR file, you can disable it in your
.update-copyright.conf and then skip `--no-authors` on the command
line.

bin/update-copyright.py

index b9214fecbbc0c3f3756cb88fec5f40d3fbbd883b..df66d61f91efcc8a61b5702b1471fcce9fc12517 100755 (executable)
@@ -73,9 +73,9 @@ if __name__ == '__main__':
 
     project = Project(root=_os_path.dirname(_os_path.abspath(args.config)))
     project.load_config(open(args.config, 'r'))
-    if args.authors:
+    if args.authors and project.with_authors:
         project.update_authors(dry_run=args.dry_run)
-    if args.files:
+    if args.files and project.with_files:
         project.update_files(files=args.file, dry_run=args.dry_run)
-    if args.pyfile:
+    if args.pyfile and project._pyfile:
         project.update_pyfile(dry_run=args.dry_run)