~smoser/simplestreams/trunk.moved-to-git

« back to all changes in this revision

Viewing changes to tools/js2signed

  • Committer: Scott Moser
  • Date: 2016-08-04 14:34:49 UTC
  • Revision ID: smoser@ubuntu.com-20160804143449-2vcpvvrni3tmqkp4
tools/run-flake8: run on all python programs in tools and fix errors

now tools/run-flake8 will run on all python programs in tools
by checking the first line for 'python'.  Then, fix all the reported
errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
def status_cb(fname):
27
27
    sys.stderr.write("%s\n" % fname)
28
28
 
 
29
 
29
30
def main():
30
31
    force = False
31
32
    if len(sys.argv) > 1 and sys.argv[1] == "--force":
42
43
            for root, _dirs, files in os.walk(path):
43
44
                for f in [f for f in files if f.endswith(".json")]:
44
45
                    signjson_file(os.path.join(root, f),
45
 
                                           status_cb=status_cb, force=force)
 
46
                                  status_cb=status_cb, force=force)
46
47
        else:
47
48
            sys.stderr.write("input must be file or dir\n")
48
49
            sys.exit(1)