From b1ed53a0b464850f9f8ce756629f10798d9c5e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 5 Jan 2016 11:17:42 +0100 Subject: [PATCH] agent/notify: skip tenants that were not deployed with hobo (#9507) --- hobo/agent/common/management/commands/hobo_notify.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hobo/agent/common/management/commands/hobo_notify.py b/hobo/agent/common/management/commands/hobo_notify.py index 61c3d58..5e13e30 100644 --- a/hobo/agent/common/management/commands/hobo_notify.py +++ b/hobo/agent/common/management/commands/hobo_notify.py @@ -15,6 +15,7 @@ # along with this program. If not, see . import json +import os import sys import random @@ -42,6 +43,8 @@ class Command(BaseCommand): def handle(self, *args, **kwargs): notification = self.load_notification(args) for tenant in TenantMiddleware.get_tenants(): + if not os.path.exists(os.path.join(tenant.get_directory(), 'hobo.json')): + continue with tenant_context(tenant): self.process_notification(tenant, notification) -- 2.6.4