prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Mycroft doesn't starts if /etc/mycroft/mycroft.conf exists and has comments
  In log.py there are these statements:
  
  if isfile(SYSTEM_CONFIG):
      with open(SYSTEM_CONFIG) as f:
          config = json.load(f)
          log_level = config.get("log_level", "DEBUG")
  
  note no filter of comments has been done using "load_commented_json".
  
  Note: no pull request will be done, because could be the best solution is do not load any config here but use the common configuration procedure.
  
  </issue>
  <code>
  [start of mycroft/util/log.py]
  1 # Copyright 2016 Mycroft AI, Inc.
  2 #
  3 # This file is part of Mycroft Core.
  4 #
  5 # Mycroft Core is free software: you can redistribute it and/or modify
  6 # it under the terms of the GNU General Public License as published by
  7 # the Free Software Foundation, either version 3 of the License, or
  8 # (at your option) any later version.
  9 #
  10 # Mycroft Core is distributed in the hope that it will be useful,
  11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13 # GNU General Public License for more details.
  14 #
  15 # You should have received a copy of the GNU General Public License
  16 # along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.
  17 import json
  18 import logging
  19 
  20 from os.path import isfile
  21 
  22 SYSTEM_CONFIG = '/etc/mycroft/mycroft.conf'
  23 
  24 __author__ = 'seanfitz'
  25 
  26 log_level = "DEBUG"
  27 
  28 if isfile(SYSTEM_CONFIG):
  29     with open(SYSTEM_CONFIG) as f:
  30         config = json.load(f)
  31         log_level = config.get("log_level", "DEBUG")
  32 
  33 FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
  34 logging.basicConfig(format=FORMAT, level=logging.getLevelName(log_level))
  35 logger = logging.getLogger("MYCROFT")
  36 
  37 
  38 def getLogger(name="MYCROFT"):
  39     """
  40     Get a python logger
  41 
  42     :param name: Module name for the logger
  43 
  44     :return: an instance of logging.Logger
  45     """
  46     return logging.getLogger(name)
  47
  [end of mycroft/util/log.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/util/log.py b/mycroft/util/log.py
  --- a/mycroft/util/log.py
  +++ b/mycroft/util/log.py
  @@ -18,6 +18,7 @@
   import logging
   
   from os.path import isfile
  +from mycroft.util.json_helper import load_commented_json
   
   SYSTEM_CONFIG = '/etc/mycroft/mycroft.conf'
   
  @@ -26,9 +27,8 @@
   log_level = "DEBUG"
   
   if isfile(SYSTEM_CONFIG):
  -    with open(SYSTEM_CONFIG) as f:
  -        config = json.load(f)
  -        log_level = config.get("log_level", "DEBUG")
  +    config = load_commented_json(SYSTEM_CONFIG)
  +    log_level = config.get("log_level", "DEBUG")
   
   FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
   logging.basicConfig(format=FORMAT, level=logging.getLevelName(log_level))
  
verification_info: {"golden_diff": "diff --git a/mycroft/util/log.py b/mycroft/util/log.py\n--- a/mycroft/util/log.py\n+++ b/mycroft/util/log.py\n@@ -18,6 +18,7 @@\n import logging\n \n from os.path import isfile\n+from mycroft.util.json_helper import load_commented_json\n \n SYSTEM_CONFIG = '/etc/mycroft/mycroft.conf'\n \n@@ -26,9 +27,8 @@\n log_level = \"DEBUG\"\n \n if isfile(SYSTEM_CONFIG):\n-    with open(SYSTEM_CONFIG) as f:\n-        config = json.load(f)\n-        log_level = config.get(\"log_level\", \"DEBUG\")\n+    config = load_commented_json(SYSTEM_CONFIG)\n+    log_level = config.get(\"log_level\", \"DEBUG\")\n \n FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'\n logging.basicConfig(format=FORMAT, level=logging.getLevelName(log_level))\n", "issue": "Mycroft doesn't starts if /etc/mycroft/mycroft.conf exists and has comments\nIn log.py there are these statements:\r\n\r\nif isfile(SYSTEM_CONFIG):\r\n    with open(SYSTEM_CONFIG) as f:\r\n        config = json.load(f)\r\n        log_level = config.get(\"log_level\", \"DEBUG\")\r\n\r\nnote no filter of comments has been done using \"load_commented_json\".\r\n\r\nNote: no pull request will be done, because could be the best solution is do not load any config here but use the common configuration procedure.\n", "before_files": [{"content": "# Copyright 2016 Mycroft AI, Inc.\n#\n# This file is part of Mycroft Core.\n#\n# Mycroft Core is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Mycroft Core is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.\nimport json\nimport logging\n\nfrom os.path import isfile\n\nSYSTEM_CONFIG = '/etc/mycroft/mycroft.conf'\n\n__author__ = 'seanfitz'\n\nlog_level = \"DEBUG\"\n\nif isfile(SYSTEM_CONFIG):\n    with open(SYSTEM_CONFIG) as f:\n        config = json.load(f)\n        log_level = config.get(\"log_level\", \"DEBUG\")\n\nFORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'\nlogging.basicConfig(format=FORMAT, level=logging.getLevelName(log_level))\nlogger = logging.getLogger(\"MYCROFT\")\n\n\ndef getLogger(name=\"MYCROFT\"):\n    \"\"\"\n    Get a python logger\n\n    :param name: Module name for the logger\n\n    :return: an instance of logging.Logger\n    \"\"\"\n    return logging.getLogger(name)\n", "path": "mycroft/util/log.py"}]}