From 9a1e549f64d3b531902de8121b2863b5d913efe1 Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Thu, 18 Aug 2011 09:39:46 +0200 Subject: Nitrate: Better error when test plan does not exist --- Nitrate.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Nitrate.py') diff --git a/Nitrate.py b/Nitrate.py index fdd68d9..b2b1f9a 100644 --- a/Nitrate.py +++ b/Nitrate.py @@ -1738,6 +1738,9 @@ class TestPlan(Mutable): testplanhash = self._server.TestPlan.get(self.id) log.debug("Initializing test plan " + self.identifier) log.debug(pretty(testplanhash)) + if not "plan_id" in testplanhash: + log.error(pretty(testplanhash)) + raise NitrateError("Failed to initialize " + self.identifier) # Set up attributes self._author = User(testplanhash["author_id"]) -- cgit