Hi list: Its me again.
Bug (I think): Pungi fails with a traceback when the config file is not
correctly specified. It says
It does not find the default section.
Reason: Its a config parser error. The ConfigParser reads the existing
files and ingnores the
not existing ones. In any case if the file does not exist or if
it exists but there is no "default"
section, pungi will fail with a traceback.
IMO catching the mistake before the traceback and telling the user what
is happening is the right thing to do.
I don't know about the message though. Its the best thing that my
little mind could come up with :)
@@ -37,7 +37,10 @@
config = SafeConfigParser()
+ if "default" not in config.sections():
+ print ("Check that the file %s exists and that "
+ "has a 'default' section" % opts.config)
if not config.has_option('default', 'flavor'):
config.set('default', 'flavor', flavor)