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 :)
The diff:
@@ -37,7 +37,10 @@
config = SafeConfigParser() config.read(opts.config) - + if "default" not in config.sections(): + print ("Check that the file %s exists and that " + "has a 'default' section" % opts.config) + exit(0) if not config.has_option('default', 'flavor'): config.set('default', 'flavor', flavor)
On Thursday 12 April 2007 12:33:51 Joel Andres Granados wrote:
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 :)
The diff:
Applied.
buildsys@lists.fedoraproject.org