-
Committer:
Alex Chiang
-
Date:
2010-11-16 16:37:02 UTC
-
Revision ID:
achiang@canonical.com-20101116163702-fi43gwy4s58o2pd5
Handle lack of .laikarc properly
If the user does not have a ~/.laikarc, the following error is displayed:
Error: unsupported configuration file format
and laika exits.
This is improper behavior. Laika should gracefully use the built-in
defaults if the user does not have a .laikarc.
Remove the has_section check, as it causes us to exit prematurely.
Instead, rewrite the try..except block more generally, so that on
any exception (either a ConfigParser.NoOptionError or
ConfigParser.NoSectionError), we fall back to the defaults.
Fixes LP: #676112