diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-11-20 18:50:21 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-11-22 17:24:42 +0300 |
commit | 3268914882eed98fc8849f83e01163728692e379 (patch) | |
tree | b2f1970c6c9a8d546ee79361ba24c6587a6c0f74 | |
parent | 25ab26cdc4c8b75c370cdd2b2685a222ba72b65a (diff) |
Don't warn about directories which just contain .sum files
-rwxr-xr-x | calm/package.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/calm/package.py b/calm/package.py index 10e69d2..746cb0b 100755 --- a/calm/package.py +++ b/calm/package.py @@ -350,9 +350,14 @@ def read_package(packages, basedir, dirpath, files, strict=False, remove=[], upl packages[p].path = relpath packages[p].skip = any(['skip' in version_hints[vr] for vr in version_hints]) - elif (len(files) > 0) and (relpath.count(os.path.sep) > 1): - logging.log(strict_lvl, "no .hint files in %s but has files: %s" % (dirpath, ', '.join(files))) - warnings = True + elif (relpath.count(os.path.sep) > 1): + for s in ['md5.sum', 'sha512.sum']: + if s in files: + files.remove(s) + + if len(files) > 0: + logging.log(strict_lvl, "no .hint files in %s but has files: %s" % (dirpath, ', '.join(files))) + warnings = True if strict: return warnings |