prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  mycroft "devices" web UI doesn't show core version
  
  Version/setup same as MycroftAI/mycroft-core#2523 2523
  
  ## Try to provide steps that we can use to replicate the Issue
  
  Hit up https://account.mycroft.ai/devices
  ![Selection_039](https://user-images.githubusercontent.com/6778269/78091868-20c38b80-739c-11ea-8934-e592838e8ab3.png)
  
  ## Provide log files or other output to help us see the error
  
  N/A TBD (can help investigate let me know how) per the ref'd ticket the "self support" method didn't work
  
  </issue>
  <code>
  [start of mycroft/version/__init__.py]
  1 # Copyright 2017 Mycroft AI Inc.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #    http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 #
  15 import json
  16 
  17 from genericpath import exists, isfile
  18 from os.path import join, expanduser
  19 
  20 from mycroft.configuration import Configuration
  21 from mycroft.util.log import LOG
  22 
  23 
  24 # The following lines are replaced during the release process.
  25 # START_VERSION_BLOCK
  26 CORE_VERSION_MAJOR = 20
  27 CORE_VERSION_MINOR = 2
  28 CORE_VERSION_BUILD = 1
  29 # END_VERSION_BLOCK
  30 
  31 CORE_VERSION_TUPLE = (CORE_VERSION_MAJOR,
  32                       CORE_VERSION_MINOR,
  33                       CORE_VERSION_BUILD)
  34 CORE_VERSION_STR = '.'.join(map(str, CORE_VERSION_TUPLE))
  35 
  36 
  37 class VersionManager:
  38     @staticmethod
  39     def get():
  40         data_dir = expanduser(Configuration.get()['data_dir'])
  41         version_file = join(data_dir, 'version.json')
  42         if exists(version_file) and isfile(version_file):
  43             try:
  44                 with open(version_file) as f:
  45                     return json.load(f)
  46             except Exception:
  47                 LOG.error("Failed to load version from '%s'" % version_file)
  48         return {"coreVersion": None, "enclosureVersion": None}
  49 
  50 
  51 def check_version(version_string):
  52     """
  53         Check if current version is equal or higher than the
  54         version string provided to the function
  55 
  56         Args:
  57             version_string (string): version string ('Major.Minor.Build')
  58     """
  59     version_tuple = tuple(map(int, version_string.split('.')))
  60     return CORE_VERSION_TUPLE >= version_tuple
  61
  [end of mycroft/version/__init__.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/mycroft/version/__init__.py b/mycroft/version/__init__.py
  --- a/mycroft/version/__init__.py
  +++ b/mycroft/version/__init__.py
  @@ -45,7 +45,7 @@
                       return json.load(f)
               except Exception:
                   LOG.error("Failed to load version from '%s'" % version_file)
  -        return {"coreVersion": None, "enclosureVersion": None}
  +        return {"coreVersion": CORE_VERSION_STR, "enclosureVersion": None}
   
   
   def check_version(version_string):
  
verification_info: {"golden_diff": "diff --git a/mycroft/version/__init__.py b/mycroft/version/__init__.py\n--- a/mycroft/version/__init__.py\n+++ b/mycroft/version/__init__.py\n@@ -45,7 +45,7 @@\n                     return json.load(f)\n             except Exception:\n                 LOG.error(\"Failed to load version from '%s'\" % version_file)\n-        return {\"coreVersion\": None, \"enclosureVersion\": None}\n+        return {\"coreVersion\": CORE_VERSION_STR, \"enclosureVersion\": None}\n \n \n def check_version(version_string):\n", "issue": "mycroft \"devices\" web UI doesn't show core version\n\r\nVersion/setup same as MycroftAI/mycroft-core#2523 2523\r\n\r\n## Try to provide steps that we can use to replicate the Issue\r\n\r\nHit up https://account.mycroft.ai/devices\r\n![Selection_039](https://user-images.githubusercontent.com/6778269/78091868-20c38b80-739c-11ea-8934-e592838e8ab3.png)\r\n\r\n## Provide log files or other output to help us see the error\r\n\r\nN/A TBD (can help investigate let me know how) per the ref'd ticket the \"self support\" method didn't work\n", "before_files": [{"content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport json\n\nfrom genericpath import exists, isfile\nfrom os.path import join, expanduser\n\nfrom mycroft.configuration import Configuration\nfrom mycroft.util.log import LOG\n\n\n# The following lines are replaced during the release process.\n# START_VERSION_BLOCK\nCORE_VERSION_MAJOR = 20\nCORE_VERSION_MINOR = 2\nCORE_VERSION_BUILD = 1\n# END_VERSION_BLOCK\n\nCORE_VERSION_TUPLE = (CORE_VERSION_MAJOR,\n                      CORE_VERSION_MINOR,\n                      CORE_VERSION_BUILD)\nCORE_VERSION_STR = '.'.join(map(str, CORE_VERSION_TUPLE))\n\n\nclass VersionManager:\n    @staticmethod\n    def get():\n        data_dir = expanduser(Configuration.get()['data_dir'])\n        version_file = join(data_dir, 'version.json')\n        if exists(version_file) and isfile(version_file):\n            try:\n                with open(version_file) as f:\n                    return json.load(f)\n            except Exception:\n                LOG.error(\"Failed to load version from '%s'\" % version_file)\n        return {\"coreVersion\": None, \"enclosureVersion\": None}\n\n\ndef check_version(version_string):\n    \"\"\"\n        Check if current version is equal or higher than the\n        version string provided to the function\n\n        Args:\n            version_string (string): version string ('Major.Minor.Build')\n    \"\"\"\n    version_tuple = tuple(map(int, version_string.split('.')))\n    return CORE_VERSION_TUPLE >= version_tuple\n", "path": "mycroft/version/__init__.py"}]}