server/errorcheck | 29 ++++++++++++++++-------------
server/mirrormanager/model.py | 4 +++-
2 files changed, 19 insertions(+), 14 deletions(-)
New commits:
commit 4e522f345ba808524488948b93e7e3282ea198c0
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Fri Feb 4 08:56:33 2011 -0600
errorcheck: supress a couple warnings for now
diff --git a/server/errorcheck b/server/errorcheck
index be7d5fe..a811114 100755
--- a/server/errorcheck
+++ b/server/errorcheck
@@ -213,19 +213,22 @@ def check_host(sr, host):
sr.messages.append(msg)
always_up2date = False
- for hc in host.categories:
- if len(hc.urls) == 0:
- msg = u"Host %s Category %s has no URLs. Please add a URL to the
content your mirror carries, or if not carried, delete the Category." % (host.name,
hc.category.name)
- sr.messages.append(msg)
-
- if hc.always_up2date: always_up2date = True
- if len(hc.dirs) == 0 and not hc.always_up2date:
- msg = u"Host %s Category %s has no up-to-date directories. " %
(host.name, hc.category.name)
- if len(hc.urls) > 0:
- msg = msg + u"Check that your Category URL points to %s. " %
(hc.category.topdir.name)
-
- msg = msg + u"Consult the crawler logs and check your
report_mirror.conf."
- sr.messages.append(msg)
+
+ # hide this for now, until checkins are fixed
+ if 0:
+ for hc in host.categories:
+ if len(hc.urls) == 0:
+ msg = u"Host %s Category %s has no URLs. Please add a URL to the
content your mirror carries, or if not carried, delete the Category." % (host.name,
hc.category.name)
+ sr.messages.append(msg)
+
+ if hc.always_up2date: always_up2date = True
+ if len(hc.dirs) == 0 and not hc.always_up2date:
+ msg = u"Host %s Category %s has no up-to-date directories. " %
(host.name, hc.category.name)
+ if len(hc.urls) > 0:
+ msg = msg + u"Check that your Category URL points to %s. "
% (hc.category.topdir.name)
+
+ msg = msg + u"Consult the crawler logs and check your
report_mirror.conf."
+ sr.messages.append(msg)
if host.lastCheckedIn is None and not always_up2date:
msg = u"Host %s has never checked in with report_mirror." %
(host.name)
commit 192dfc4ea4041818d22ec0ac990390b0b23e1d23
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Fri Feb 4 08:55:56 2011 -0600
model: don't let report_mirror checkins create HostCategory objects
diff --git a/server/mirrormanager/model.py b/server/mirrormanager/model.py
index cd4817f..8838302 100644
--- a/server/mirrormanager/model.py
+++ b/server/mirrormanager/model.py
@@ -259,7 +259,9 @@ class Host(SQLObject):
if hc.count() > 0:
hc = hc[0]
else:
- hc = HostCategory(host=self, category=category)
+ # don't let report_mirror create HostCategories
+ # it must be done through the web UI
+ continue
marked_up2date = 0
deleted = 0
Show replies by date