From a861bb2aaf703a496f622b9e01bdd150c991ea58 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 15 May 2007 14:14:16 -0400 Subject: [PATCH] - Handle config file missing better (jgranado) --- pungi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pungi b/pungi index ede2cbb2..fd94c774 100755 --- a/pungi +++ b/pungi @@ -38,6 +38,10 @@ def main(): config = SafeConfigParser() config.read(opts.config) + if "default" not in config.sections(): + print ("Check that the file %s exists and that it has a 'default' section" % opts.config) + sys.exit(1) + if not config.has_option('default', 'flavor'): config.set('default', 'flavor', flavor)