From 082f9f53d65388d1d9128cef8ec6ebbcb0aa3b33 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 16 Feb 2012 14:16:30 -0500 Subject: [PATCH] Allow '-' characters in section names. --- update_copyright/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update_copyright/project.py b/update_copyright/project.py index 2402700..ac93c2f 100644 --- a/update_copyright/project.py +++ b/update_copyright/project.py @@ -94,8 +94,9 @@ class Project (object): parser = _configparser.RawConfigParser() parser.readfp(stream) for section in parser.sections(): + clean_section = section.replace('-', '_') try: - loader = getattr(self, '_load_{}_conf'.format(section)) + loader = getattr(self, '_load_{}_conf'.format(clean_section)) except AttributeError, e: _LOG.error('invalid {} section'.format(section)) raise -- 2.26.2