prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  runbot 9.0 red due to letsencrypt?
  Hi,
  
  It seems the 9.0 branch is red on runbot due to the letsencrypt module?
  
  ```
  Call of self.pool.get('letsencrypt').cron(cr, uid, *()) failed in Job 2
  Traceback (most recent call last):
    File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/addons/base/ir/ir_cron.py", line 129, in _callback
      getattr(model, method_name)(cr, uid, *args)
    File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/api.py", line 250, in wrapper
      return old_api(self, *args, **kwargs)
    File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/api.py", line 354, in old_api
      result = method(recs, *args, **kwargs)
    File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/addons/letsencrypt/models/letsencrypt.py", line 151, in cron
      account_key, csr, acme_challenge, log=_logger, CA=DEFAULT_CA)
    File "/srv/openerp/instances/openerp-oca-runbot/sandbox/local/lib/python2.7/site-packages/acme_tiny.py", line 104, in get_crt
      raise ValueError("Error requesting challenges: {0} {1}".format(code, result))
  ValueError: Error requesting challenges: 400 {
    "type": "urn:acme:error:malformed",
    "detail": "Error creating new authz :: Invalid character in DNS name",
    "status": 400
  }
  ```
  
  @hbrunn 
  
  
  </issue>
  <code>
  [start of letsencrypt/__openerp__.py]
  1 # -*- coding: utf-8 -*-
  2 # © 2016 Therp BV <http://therp.nl>
  3 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4 {
  5     "name": "Let's encrypt",
  6     "version": "9.0.1.0.0",
  7     "author": "Therp BV,"
  8               "Tecnativa,"
  9               "Odoo Community Association (OCA)",
  10     "license": "AGPL-3",
  11     "category": "Hidden/Dependency",
  12     "summary": "Request SSL certificates from letsencrypt.org",
  13     "depends": [
  14         'base',
  15     ],
  16     "data": [
  17         "data/ir_config_parameter.xml",
  18         "data/ir_cron.xml",
  19     ],
  20     "post_init_hook": 'post_init_hook',
  21     "installable": True,
  22     "external_dependencies": {
  23         'bin': [
  24             'openssl',
  25         ],
  26         'python': [
  27             'acme_tiny',
  28             'IPy',
  29         ],
  30     },
  31 }
  32
  [end of letsencrypt/__openerp__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/letsencrypt/__openerp__.py b/letsencrypt/__openerp__.py
  --- a/letsencrypt/__openerp__.py
  +++ b/letsencrypt/__openerp__.py
  @@ -16,6 +16,7 @@
       "data": [
           "data/ir_config_parameter.xml",
           "data/ir_cron.xml",
  +        "demo/ir_cron.xml",
       ],
       "post_init_hook": 'post_init_hook',
       "installable": True,
  
verification_info: {"golden_diff": "diff --git a/letsencrypt/__openerp__.py b/letsencrypt/__openerp__.py\n--- a/letsencrypt/__openerp__.py\n+++ b/letsencrypt/__openerp__.py\n@@ -16,6 +16,7 @@\n     \"data\": [\n         \"data/ir_config_parameter.xml\",\n         \"data/ir_cron.xml\",\n+        \"demo/ir_cron.xml\",\n     ],\n     \"post_init_hook\": 'post_init_hook',\n     \"installable\": True,\n", "issue": "runbot 9.0 red due to letsencrypt?\nHi,\n\nIt seems the 9.0 branch is red on runbot due to the letsencrypt module?\n\n```\nCall of self.pool.get('letsencrypt').cron(cr, uid, *()) failed in Job 2\nTraceback (most recent call last):\n  File \"/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/addons/base/ir/ir_cron.py\", line 129, in _callback\n    getattr(model, method_name)(cr, uid, *args)\n  File \"/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/api.py\", line 250, in wrapper\n    return old_api(self, *args, **kwargs)\n  File \"/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/api.py\", line 354, in old_api\n    result = method(recs, *args, **kwargs)\n  File \"/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9-0-209efa/openerp/addons/letsencrypt/models/letsencrypt.py\", line 151, in cron\n    account_key, csr, acme_challenge, log=_logger, CA=DEFAULT_CA)\n  File \"/srv/openerp/instances/openerp-oca-runbot/sandbox/local/lib/python2.7/site-packages/acme_tiny.py\", line 104, in get_crt\n    raise ValueError(\"Error requesting challenges: {0} {1}\".format(code, result))\nValueError: Error requesting challenges: 400 {\n  \"type\": \"urn:acme:error:malformed\",\n  \"detail\": \"Error creating new authz :: Invalid character in DNS name\",\n  \"status\": 400\n}\n```\n\n@hbrunn \n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# \u00a9 2016 Therp BV <http://therp.nl>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n    \"name\": \"Let's encrypt\",\n    \"version\": \"9.0.1.0.0\",\n    \"author\": \"Therp BV,\"\n              \"Tecnativa,\"\n              \"Odoo Community Association (OCA)\",\n    \"license\": \"AGPL-3\",\n    \"category\": \"Hidden/Dependency\",\n    \"summary\": \"Request SSL certificates from letsencrypt.org\",\n    \"depends\": [\n        'base',\n    ],\n    \"data\": [\n        \"data/ir_config_parameter.xml\",\n        \"data/ir_cron.xml\",\n    ],\n    \"post_init_hook\": 'post_init_hook',\n    \"installable\": True,\n    \"external_dependencies\": {\n        'bin': [\n            'openssl',\n        ],\n        'python': [\n            'acme_tiny',\n            'IPy',\n        ],\n    },\n}\n", "path": "letsencrypt/__openerp__.py"}]}