# HG changeset patch # User Matti Hamalainen # Date 1467626062 -10800 # Node ID f2ecfb3e04eed81220bd9d88fe3316baa7acd57e # Parent ee6bf617f839402be5fcc73cb44318ae3618e1c4 Check that the required section exists in configuration. diff -r ee6bf617f839 -r f2ecfb3e04ee multimerge.py --- a/multimerge.py Mon Jul 04 12:53:11 2016 +0300 +++ b/multimerge.py Mon Jul 04 12:54:22 2016 +0300 @@ -250,6 +250,11 @@ except Exception as e: gcm_fatal("Failed to read configuration file '{0}': {1}".format(sys.argv[1], str(e))) + # Check that the required section exists + section = "gcm" + if not cfgparser.has_section(section): + gcm_fatal("Invalid configuration, missing '{0}' section.".format(section)) + # Parse the settings and validate cfg.mread(cfgparser, section)