Improve error handling when looking up instances
authorHelga Velroyen <helgav@google.com>
Mon, 23 Mar 2015 17:16:51 +0000 (18:16 +0100)
committerHelga Velroyen <helgav@google.com>
Tue, 24 Mar 2015 11:44:23 +0000 (12:44 +0100)
commit51e9eef694c9ab8ff0876bc3fc521d815f40fb91
treef474ff8d2d6208f3409e3403898f8a9c99b5aac9
parentc1ff28321d5812045eb9bd15916c6404659cc33a
Improve error handling when looking up instances

When looking up configuration data of instances which don't
exist, the code so far fails with a cryptic error messages
about NoneType not having an attribute. Although actually
this situation should not happen, let's at least throw an
exception with a proper description.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
lib/cmdlib/cluster.py
lib/config.py