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>2018-10-25 17:26:52 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2019-03-14 23:19:20 +0300
commitf4a2d0c6435a90ab9d647da69518bbb43ec09287 (patch)
tree404b309f934adea8f84761dd28a3c4d8a2c7a670
parent0f05f121774fe05aab0243d4eed30ff5dc398a56 (diff)
Don't warn about non-maintainer upload attempts on every run
Don't warn about non-maintainer package upload attempts on every run, only when something is ready to move
-rw-r--r--calm/uploads.py41
1 files changed, 23 insertions, 18 deletions
diff --git a/calm/uploads.py b/calm/uploads.py
index 0861388..1d8c1bf 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -107,6 +107,29 @@ def scan(m, all_packages, arch, args):
else:
mtimes.pop()
+ # only process files newer than !ready
+ for f in sorted(files):
+ fn = os.path.join(dirpath, f)
+ file_mtime = os.path.getmtime(fn)
+ if file_mtime > mtime:
+ if mtime == 0:
+ m.reminders_timestamp_checked = True
+
+ logging.debug("ignoring %s as there is no !ready" % fn)
+ ignored += 1
+
+ # don't warn until file is at least REMINDER_GRACE old
+ if (file_mtime < (time.time() - REMINDER_GRACE)):
+ if not args.dryrun:
+ m.reminders_issued = True
+ else:
+ logging.warning("ignoring %s as it is newer than !ready" % fn)
+ files.remove(f)
+
+ # any file remaining?
+ if not files:
+ continue
+
# package doesn't appear in package list at all
if not package.is_in_package_list(relpath, all_packages):
logging.error("package '%s' is not in the package list" % dirpath)
@@ -166,24 +189,6 @@ def scan(m, all_packages, arch, args):
files.remove(f)
continue
- # only process files newer than !ready
- file_mtime = os.path.getmtime(fn)
- if file_mtime > mtime:
- if mtime == 0:
- m.reminders_timestamp_checked = True
-
- logging.debug("ignoring %s as there is no !ready" % fn)
- ignored += 1
-
- # don't warn until file is at least REMINDER_GRACE old
- if (file_mtime < (time.time() - REMINDER_GRACE)):
- if not args.dryrun:
- m.reminders_issued = True
- else:
- logging.warning("ignoring %s as it is newer than !ready" % fn)
- files.remove(f)
- continue
-
# a remove file, which indicates some other file should be removed
if f.startswith('-'):
if ('*' in f) or ('?' in f):