[damned-lies] Warn if no modules match in update-stats



commit 0d2c6ec18703eec5bd86ec4c13f23d7c1a27c97d
Author: Claude Paroz <claude 2xlibre net>
Date:   Mon Apr 2 11:52:33 2018 +0200

    Warn if no modules match in update-stats

 stats/management/commands/update-stats.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/stats/management/commands/update-stats.py b/stats/management/commands/update-stats.py
index c882387..7b66494 100644
--- a/stats/management/commands/update-stats.py
+++ b/stats/management/commands/update-stats.py
@@ -32,6 +32,8 @@ class Command(BaseCommand):
             modules = Module.objects.filter(
                 Q(name=options['module']) | Q(vcs_root__endswith='/%s' % options['module'])
             )
+            if not modules:
+                self.stderr.write("No modules match `%s`." % options['module'])
             for i, module in enumerate(modules):
                 if module.archived and not self.force_stats:
                     self.stderr.write("The module '%s' is archived. Skipping..." % module.name)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]