diff --git a/sync2jira/downstream_issue.py b/sync2jira/downstream_issue.py index 57214e7..4ab83cb 100644 --- a/sync2jira/downstream_issue.py +++ b/sync2jira/downstream_issue.py @@ -978,6 +978,10 @@ def _update_github_project_fields(client, existing, issue, default_jira_fields = config['sync2jira'].get('default_jira_fields', {}) for name, values in github_project_fields.items(): + if name not in dir(issue): + log.error(f"Configuration error: github_project_field key, {name:r}, is not in issue object.") + continue + log.info(f"Looking at GHP field '{name}' with configuration '{values}'") fieldvalue = getattr(issue, name) log.info(f"Issue value for field '{name}' is '{fieldvalue}'") diff --git a/sync2jira/main.py b/sync2jira/main.py index f58ac65..6897e92 100644 --- a/sync2jira/main.py +++ b/sync2jira/main.py @@ -87,7 +87,7 @@ INITIALIZE = os.getenv('INITIALIZE', '0') -def load_config(loader=fedmsg.config.conf.load_config): +def load_config(loader=lambda: fedmsg.config.conf): """ Generates and validates the config file \ that will be used by fedmsg and JIRA client.