prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  KeyError handle_modules with 0.27.0 on openSUSE
  ## My operating system is (include version):
  
  openSUSE Leap 42.1
  
  ## I installed Certbot with (certbot-auto, OS package manager, pip, etc):
  
  certbot-auto
  
  ## I ran this command and it produced this output:
  
  ````
  kevdev36:~ # certbot-auto --version
  Upgrading certbot-auto 0.26.1 to 0.27.0...
  Replacing certbot-auto...
  Creating virtual environment...
  Installing Python packages...
  Installation succeeded.
  An unexpected error occurred:
  KeyError: 'handle_modules'
  Please see the logfile '/tmp/tmpMAZJox' for more details.
  ````
  
  ## Certbot's behavior differed from what I expected because:
  
  It did not print the version.
  
  ## Here is a Certbot log showing the issue (if available):
  
  /tmp/tmpMAZJox
  
  ````
  2018-09-06 09:59:58,652:DEBUG:certbot.main:certbot version: 0.27.0
  2018-09-06 09:59:58,652:DEBUG:certbot.main:Arguments: ['--version']
  2018-09-06 09:59:58,653:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
  2018-09-06 09:59:58,660:DEBUG:certbot.log:Exiting abnormally:
  Traceback (most recent call last):
    File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
      sys.exit(main())
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/main.py", line 1345, in main
      args = cli.prepare_and_parse_args(plugins, cli_args)
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py", line 1243, in prepare_and_parse_args
      _plugins_parsing(helpful, plugins)
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py", line 1458, in _plugins_parsing
      helpful.add_plugin_args(plugins)
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py", line 840, in add_plugin_args
      plugin_ep.plugin_cls.inject_parser_options(parser_or_group, name)
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/plugins/common.py", line 81, in inject_parser_options
      return cls.add_parser_arguments(add)
    File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot_apache/configurator.py", line 159, in add_parser_arguments
      add("handle-modules", default=cls.OS_DEFAULTS["handle_modules"],
  KeyError: 'handle_modules'
  2018-09-06 09:59:58,660:ERROR:certbot.log:An unexpected error occurred:
  ````
  
  ## Workaround
  
  Downgrade to 0.26.1 and use `certbot-auto` with `--no-self-upgrade`.
  
  ````
  kevdev36:~ # wget https://raw.githubusercontent.com/certbot/certbot/v0.26.1/certbot-auto
  kevdev36:~ # chmod +x certbot-auto
  kevdev36:~ # /opt/eff.org/certbot/venv/bin/pip install certbot==0.26.1 certbot-apache==0.26.1 certbot-nginx==0.26.1
  kevdev36:~ # ./certbot-auto --no-self-upgrade --version
  certbot 0.26.1
  ````
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `certbot-apache/certbot_apache/override_suse.py`
  Content:
  ```
  1 """ Distribution specific override class for OpenSUSE """
  2 import pkg_resources
  3 
  4 import zope.interface
  5 
  6 from certbot import interfaces
  7 
  8 from certbot_apache import configurator
  9 
  10 @zope.interface.provider(interfaces.IPluginFactory)
  11 class OpenSUSEConfigurator(configurator.ApacheConfigurator):
  12     """OpenSUSE specific ApacheConfigurator override class"""
  13 
  14     OS_DEFAULTS = dict(
  15         server_root="/etc/apache2",
  16         vhost_root="/etc/apache2/vhosts.d",
  17         vhost_files="*.conf",
  18         logs_root="/var/log/apache2",
  19         ctl="apache2ctl",
  20         version_cmd=['apache2ctl', '-v'],
  21         restart_cmd=['apache2ctl', 'graceful'],
  22         conftest_cmd=['apache2ctl', 'configtest'],
  23         enmod="a2enmod",
  24         dismod="a2dismod",
  25         le_vhost_ext="-le-ssl.conf",
  26         handle_mods=False,
  27         handle_sites=False,
  28         challenge_location="/etc/apache2/vhosts.d",
  29         MOD_SSL_CONF_SRC=pkg_resources.resource_filename(
  30             "certbot_apache", "options-ssl-apache.conf")
  31     )
  32
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/certbot-apache/certbot_apache/override_suse.py b/certbot-apache/certbot_apache/override_suse.py
  --- a/certbot-apache/certbot_apache/override_suse.py
  +++ b/certbot-apache/certbot_apache/override_suse.py
  @@ -23,7 +23,7 @@
           enmod="a2enmod",
           dismod="a2dismod",
           le_vhost_ext="-le-ssl.conf",
  -        handle_mods=False,
  +        handle_modules=False,
           handle_sites=False,
           challenge_location="/etc/apache2/vhosts.d",
           MOD_SSL_CONF_SRC=pkg_resources.resource_filename(
  
verification_info: {"golden_diff": "diff --git a/certbot-apache/certbot_apache/override_suse.py b/certbot-apache/certbot_apache/override_suse.py\n--- a/certbot-apache/certbot_apache/override_suse.py\n+++ b/certbot-apache/certbot_apache/override_suse.py\n@@ -23,7 +23,7 @@\n         enmod=\"a2enmod\",\n         dismod=\"a2dismod\",\n         le_vhost_ext=\"-le-ssl.conf\",\n-        handle_mods=False,\n+        handle_modules=False,\n         handle_sites=False,\n         challenge_location=\"/etc/apache2/vhosts.d\",\n         MOD_SSL_CONF_SRC=pkg_resources.resource_filename(\n", "issue": "KeyError handle_modules with 0.27.0 on openSUSE\n## My operating system is (include version):\r\n\r\nopenSUSE Leap 42.1\r\n\r\n## I installed Certbot with (certbot-auto, OS package manager, pip, etc):\r\n\r\ncertbot-auto\r\n\r\n## I ran this command and it produced this output:\r\n\r\n````\r\nkevdev36:~ # certbot-auto --version\r\nUpgrading certbot-auto 0.26.1 to 0.27.0...\r\nReplacing certbot-auto...\r\nCreating virtual environment...\r\nInstalling Python packages...\r\nInstallation succeeded.\r\nAn unexpected error occurred:\r\nKeyError: 'handle_modules'\r\nPlease see the logfile '/tmp/tmpMAZJox' for more details.\r\n````\r\n\r\n## Certbot's behavior differed from what I expected because:\r\n\r\nIt did not print the version.\r\n\r\n## Here is a Certbot log showing the issue (if available):\r\n\r\n/tmp/tmpMAZJox\r\n\r\n````\r\n2018-09-06 09:59:58,652:DEBUG:certbot.main:certbot version: 0.27.0\r\n2018-09-06 09:59:58,652:DEBUG:certbot.main:Arguments: ['--version']\r\n2018-09-06 09:59:58,653:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)\r\n2018-09-06 09:59:58,660:DEBUG:certbot.log:Exiting abnormally:\r\nTraceback (most recent call last):\r\n  File \"/opt/eff.org/certbot/venv/bin/letsencrypt\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/main.py\", line 1345, in main\r\n    args = cli.prepare_and_parse_args(plugins, cli_args)\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py\", line 1243, in prepare_and_parse_args\r\n    _plugins_parsing(helpful, plugins)\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py\", line 1458, in _plugins_parsing\r\n    helpful.add_plugin_args(plugins)\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/cli.py\", line 840, in add_plugin_args\r\n    plugin_ep.plugin_cls.inject_parser_options(parser_or_group, name)\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/plugins/common.py\", line 81, in inject_parser_options\r\n    return cls.add_parser_arguments(add)\r\n  File \"/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot_apache/configurator.py\", line 159, in add_parser_arguments\r\n    add(\"handle-modules\", default=cls.OS_DEFAULTS[\"handle_modules\"],\r\nKeyError: 'handle_modules'\r\n2018-09-06 09:59:58,660:ERROR:certbot.log:An unexpected error occurred:\r\n````\r\n\r\n## Workaround\r\n\r\nDowngrade to 0.26.1 and use `certbot-auto` with `--no-self-upgrade`.\r\n\r\n````\r\nkevdev36:~ # wget https://raw.githubusercontent.com/certbot/certbot/v0.26.1/certbot-auto\r\nkevdev36:~ # chmod +x certbot-auto\r\nkevdev36:~ # /opt/eff.org/certbot/venv/bin/pip install certbot==0.26.1 certbot-apache==0.26.1 certbot-nginx==0.26.1\r\nkevdev36:~ # ./certbot-auto --no-self-upgrade --version\r\ncertbot 0.26.1\r\n````\n", "before_files": [{"content": "\"\"\" Distribution specific override class for OpenSUSE \"\"\"\nimport pkg_resources\n\nimport zope.interface\n\nfrom certbot import interfaces\n\nfrom certbot_apache import configurator\n\n@zope.interface.provider(interfaces.IPluginFactory)\nclass OpenSUSEConfigurator(configurator.ApacheConfigurator):\n    \"\"\"OpenSUSE specific ApacheConfigurator override class\"\"\"\n\n    OS_DEFAULTS = dict(\n        server_root=\"/etc/apache2\",\n        vhost_root=\"/etc/apache2/vhosts.d\",\n        vhost_files=\"*.conf\",\n        logs_root=\"/var/log/apache2\",\n        ctl=\"apache2ctl\",\n        version_cmd=['apache2ctl', '-v'],\n        restart_cmd=['apache2ctl', 'graceful'],\n        conftest_cmd=['apache2ctl', 'configtest'],\n        enmod=\"a2enmod\",\n        dismod=\"a2dismod\",\n        le_vhost_ext=\"-le-ssl.conf\",\n        handle_mods=False,\n        handle_sites=False,\n        challenge_location=\"/etc/apache2/vhosts.d\",\n        MOD_SSL_CONF_SRC=pkg_resources.resource_filename(\n            \"certbot_apache\", \"options-ssl-apache.conf\")\n    )\n", "path": "certbot-apache/certbot_apache/override_suse.py"}], "after_files": [{"content": "\"\"\" Distribution specific override class for OpenSUSE \"\"\"\nimport pkg_resources\n\nimport zope.interface\n\nfrom certbot import interfaces\n\nfrom certbot_apache import configurator\n\n@zope.interface.provider(interfaces.IPluginFactory)\nclass OpenSUSEConfigurator(configurator.ApacheConfigurator):\n    \"\"\"OpenSUSE specific ApacheConfigurator override class\"\"\"\n\n    OS_DEFAULTS = dict(\n        server_root=\"/etc/apache2\",\n        vhost_root=\"/etc/apache2/vhosts.d\",\n        vhost_files=\"*.conf\",\n        logs_root=\"/var/log/apache2\",\n        ctl=\"apache2ctl\",\n        version_cmd=['apache2ctl', '-v'],\n        restart_cmd=['apache2ctl', 'graceful'],\n        conftest_cmd=['apache2ctl', 'configtest'],\n        enmod=\"a2enmod\",\n        dismod=\"a2dismod\",\n        le_vhost_ext=\"-le-ssl.conf\",\n        handle_modules=False,\n        handle_sites=False,\n        challenge_location=\"/etc/apache2/vhosts.d\",\n        MOD_SSL_CONF_SRC=pkg_resources.resource_filename(\n            \"certbot_apache\", \"options-ssl-apache.conf\")\n    )\n", "path": "certbot-apache/certbot_apache/override_suse.py"}]}