Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2017-11-20 18:50:21 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2017-11-22 17:24:42 +0300
commit3268914882eed98fc8849f83e01163728692e379 (patch)
treeb2f1970c6c9a8d546ee79361ba24c6587a6c0f74
parent25ab26cdc4c8b75c370cdd2b2685a222ba72b65a (diff)
Don't warn about directories which just contain .sum files
-rwxr-xr-xcalm/package.py11
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