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>2020-03-29 16:26:41 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2020-03-29 16:27:30 +0300
commit758465b6105cac90244153a3d3ded4e892579fc8 (patch)
tree5c88de3b2e968fc28105f7e9f956b2d12f0ca329
parent7da8ec944a3b75d1a24aa10163612bab1c685c37 (diff)
Ignore .bak files in upload area that hint fixer might create
-rw-r--r--calm/uploads.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/calm/uploads.py b/calm/uploads.py
index 1794257..fe938fa 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -79,10 +79,15 @@ def scan(m, all_packages, arch, args):
logging.debug("reminder-timestamp %d, interval %d, next reminder %d, current time %d" % (m.reminder_time, REMINDER_INTERVAL, m.reminder_time + REMINDER_INTERVAL, time.time()))
# scan package directories
- for (dirpath, subdirs, files) in os.walk(os.path.join(basedir, 'release')):
+ for (dirpath, _subdirs, files) in os.walk(os.path.join(basedir, 'release')):
relpath = os.path.relpath(dirpath, m.homedir())
removed_files = []
+ # filter out files we don't need to consider
+ for f in sorted(files):
+ if f.endswith('.bak'):
+ files.remove(f)
+
# skip uninteresting directories
if (not files) or (relpath == os.path.join(arch, 'release')):
continue