diff options
author | Petr Šplíchal <psplicha@redhat.com> | 2011-08-18 09:39:46 +0200 |
---|---|---|
committer | Petr Šplíchal <psplicha@redhat.com> | 2011-08-18 09:39:46 +0200 |
commit | 9a1e549f64d3b531902de8121b2863b5d913efe1 (patch) | |
tree | 6a44e5adc2ba5b401934f23220b1b068b0fda1ea | |
parent | eb089bd125966d5948699df7b9115a242149ea2e (diff) | |
download | python-nitrate-9a1e549f64d3b531902de8121b2863b5d913efe1.tar.gz python-nitrate-9a1e549f64d3b531902de8121b2863b5d913efe1.tar.xz python-nitrate-9a1e549f64d3b531902de8121b2863b5d913efe1.zip |
Nitrate: Better error when test plan does not exist
-rw-r--r-- | Nitrate.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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"]) |