We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
If the mkdocs.yml is completely empty there is a traceback
```
Traceback (most recent call last):
  File "/home/dougalmatthews/.virtualenvs/mkdocs/bin/mkdocs", line 9, in <module>
    load_entry_point('mkdocs==0.11.1', 'console_scripts', 'mkdocs')()
  File "/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/main.py", line 60, in run_main
    main(cmd, args=sys.argv[2:], options=dict(opts))
  File "/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/main.py", line 32, in main
    config = load_config(options=options)
  File "/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/config.py", line 82, in load_config
    user_config.update(options)
AttributeError: 'NoneType' object has no attribute 'update'
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mkdocs/config.py`
Content:
```
1 # coding: utf-8
2 
3 from mkdocs import utils
4 from mkdocs.compat import urlparse
5 from mkdocs.exceptions import ConfigurationError
6 
7 import os
8 import yaml
9 
10 DEFAULT_CONFIG = {
11     'site_name': None,
12     'pages': None,
13 
14     'site_url': None,
15     'site_description': None,
16     'site_author': None,
17     'site_favicon': None,
18 
19     'theme': 'mkdocs',
20     'docs_dir': 'docs',
21     'site_dir': 'site',
22     'theme_dir': None,
23 
24     'copyright': None,
25     'google_analytics': None,
26 
27     # The address on which to serve the livereloading docs server.
28     'dev_addr': '127.0.0.1:8000',
29 
30     # If `True`, use `<page_name>/index.hmtl` style files with hyperlinks to the directory.
31     # If `False`, use `<page_name>.html style file with hyperlinks to the file.
32     # True generates nicer URLs, but False is useful if browsing the output on a filesystem.
33     'use_directory_urls': True,
34 
35     # Specify a link to the project source repo to be included
36     # in the documentation pages.
37     'repo_url': None,
38 
39     # A name to use for the link to the project source repo.
40     # Default: If repo_url is unset then None, otherwise
41     # "GitHub" or "Bitbucket" for known url or Hostname for unknown urls.
42     'repo_name': None,
43 
44     # Specify which css or javascript files from the docs
45     # directionary should be additionally included in the site.
46     # Default: List of all .css and .js files in the docs dir.
47     'extra_css': None,
48     'extra_javascript': None,
49 
50     # Determine if the site should include the nav and next/prev elements.
51     # Default: True if the site has more than one page, False otherwise.
52     'include_nav': None,
53     'include_next_prev': None,
54 
55     # PyMarkdown extension names.
56     'markdown_extensions': (),
57 
58     # Determine if the site should generate a json search index and include
59     # search elements in the theme. - TODO
60     'include_search': False,
61 
62     # Determine if the site should include a 404.html page.
63     # TODO: Implment this. Make this None, have it True if a 404.html
64     # template exists in the theme or docs dir.
65     'include_404': False,
66 
67     # Determine if the site should include a sitemap.xml page.
68     # TODO: Implement this. Make this None, have it True if a sitemap.xml
69     # template exists in the theme or docs dir.
70     'include_sitemap': False,
71 }
72 
73 
74 def load_config(filename='mkdocs.yml', options=None):
75     options = options or {}
76     if 'config' in options:
77         filename = options['config']
78     if not os.path.exists(filename):
79         raise ConfigurationError("Config file '%s' does not exist." % filename)
80     with open(filename, 'r') as fp:
81         user_config = yaml.load(fp)
82     user_config.update(options)
83     return validate_config(user_config)
84 
85 
86 def validate_config(user_config):
87     config = DEFAULT_CONFIG.copy()
88     config.update(user_config)
89 
90     if not config['site_name']:
91         raise ConfigurationError("Config must contain 'site_name' setting.")
92 
93     # If not specified, then the 'pages' config simply includes all
94     # markdown files in the docs dir, without generating any header items
95     # for them.
96     pages = []
97     extra_css = []
98     extra_javascript = []
99     for (dirpath, dirnames, filenames) in os.walk(config['docs_dir']):
100         for filename in sorted(filenames):
101             fullpath = os.path.join(dirpath, filename)
102             relpath = os.path.relpath(fullpath, config['docs_dir'])
103 
104             if utils.is_markdown_file(filename):
105                 # index pages should always be the first listed page.
106                 if os.path.splitext(relpath)[0] == 'index':
107                     pages.insert(0, relpath)
108                 else:
109                     pages.append(relpath)
110             elif utils.is_css_file(filename):
111                 extra_css.append(relpath)
112             elif utils.is_javascript_file(filename):
113                 extra_javascript.append(relpath)
114 
115     if config['pages'] is None:
116         config['pages'] = pages
117 
118     if config['extra_css'] is None:
119         config['extra_css'] = extra_css
120 
121     if config['extra_javascript'] is None:
122         config['extra_javascript'] = extra_javascript
123 
124     package_dir = os.path.dirname(__file__)
125     theme_dir = [os.path.join(package_dir, 'themes', config['theme'])]
126 
127     if config['theme_dir'] is not None:
128         theme_dir.insert(0, config['theme_dir'])
129 
130     config['theme_dir'] = theme_dir
131 
132     if config['repo_url'] is not None and config['repo_name'] is None:
133         repo_host = urlparse(config['repo_url']).netloc.lower()
134         if repo_host == 'github.com':
135             config['repo_name'] = 'GitHub'
136         elif repo_host == 'bitbucket.com':
137             config['repo_name'] = 'Bitbucket'
138         else:
139             config['repo_name'] = repo_host.split('.')[0].title()
140 
141     if config['include_next_prev'] is None:
142         config['include_next_prev'] = len(config['pages']) > 1
143 
144     if config['include_nav'] is None:
145         config['include_nav'] = len(config['pages']) > 1
146 
147     # To Do:
148 
149     # The docs dir must exist.
150     # The theme dir must exist.
151     # Ensure 'theme' is one of 'mkdocs', 'readthedocs', 'custom'
152     # A homepage 'index' must exist.
153     # The theme 'base.html' file must exist.
154     # Cannot set repo_name without setting repo_url.
155     # Cannot set 'include_next_prev: true' when only one page exists.
156     # Cannot set 'include_nav: true' when only one page exists.
157     # Error if any config keys provided that are not in the DEFAULT_CONFIG.
158 
159     return config
160
```
--- 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()

```

diff --git a/mkdocs/config.py b/mkdocs/config.py
--- a/mkdocs/config.py
+++ b/mkdocs/config.py
@@ -74,11 +74,13 @@
 def load_config(filename='mkdocs.yml', options=None):
     options = options or {}
     if 'config' in options:
-        filename = options['config']
+        filename = options.pop('config')
     if not os.path.exists(filename):
         raise ConfigurationError("Config file '%s' does not exist." % filename)
     with open(filename, 'r') as fp:
         user_config = yaml.load(fp)
+        if not isinstance(user_config, dict):
+            raise ConfigurationError("The mkdocs.yml file is invalid. See http://www.mkdocs.org/user-guide/configuration/ for more information.")
     user_config.update(options)
     return validate_config(user_config)

{"golden_diff": "diff --git a/mkdocs/config.py b/mkdocs/config.py\n--- a/mkdocs/config.py\n+++ b/mkdocs/config.py\n@@ -74,11 +74,13 @@\n def load_config(filename='mkdocs.yml', options=None):\n     options = options or {}\n     if 'config' in options:\n-        filename = options['config']\n+        filename = options.pop('config')\n     if not os.path.exists(filename):\n         raise ConfigurationError(\"Config file '%s' does not exist.\" % filename)\n     with open(filename, 'r') as fp:\n         user_config = yaml.load(fp)\n+        if not isinstance(user_config, dict):\n+            raise ConfigurationError(\"The mkdocs.yml file is invalid. See http://www.mkdocs.org/user-guide/configuration/ for more information.\")\n     user_config.update(options)\n     return validate_config(user_config)\n", "issue": "If the mkdocs.yml is completely empty there is a traceback\n```\nTraceback (most recent call last):\n  File \"/home/dougalmatthews/.virtualenvs/mkdocs/bin/mkdocs\", line 9, in <module>\n    load_entry_point('mkdocs==0.11.1', 'console_scripts', 'mkdocs')()\n  File \"/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/main.py\", line 60, in run_main\n    main(cmd, args=sys.argv[2:], options=dict(opts))\n  File \"/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/main.py\", line 32, in main\n    config = load_config(options=options)\n  File \"/home/dougalmatthews/.virtualenvs/mkdocs/lib/python3.4/site-packages/mkdocs/config.py\", line 82, in load_config\n    user_config.update(options)\nAttributeError: 'NoneType' object has no attribute 'update'\n```\n\n", "before_files": [{"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport os\nimport yaml\n\nDEFAULT_CONFIG = {\n    'site_name': None,\n    'pages': None,\n\n    'site_url': None,\n    'site_description': None,\n    'site_author': None,\n    'site_favicon': None,\n\n    'theme': 'mkdocs',\n    'docs_dir': 'docs',\n    'site_dir': 'site',\n    'theme_dir': None,\n\n    'copyright': None,\n    'google_analytics': None,\n\n    # The address on which to serve the livereloading docs server.\n    'dev_addr': '127.0.0.1:8000',\n\n    # If `True`, use `<page_name>/index.hmtl` style files with hyperlinks to the directory.\n    # If `False`, use `<page_name>.html style file with hyperlinks to the file.\n    # True generates nicer URLs, but False is useful if browsing the output on a filesystem.\n    'use_directory_urls': True,\n\n    # Specify a link to the project source repo to be included\n    # in the documentation pages.\n    'repo_url': None,\n\n    # A name to use for the link to the project source repo.\n    # Default: If repo_url is unset then None, otherwise\n    # \"GitHub\" or \"Bitbucket\" for known url or Hostname for unknown urls.\n    'repo_name': None,\n\n    # Specify which css or javascript files from the docs\n    # directionary should be additionally included in the site.\n    # Default: List of all .css and .js files in the docs dir.\n    'extra_css': None,\n    'extra_javascript': None,\n\n    # Determine if the site should include the nav and next/prev elements.\n    # Default: True if the site has more than one page, False otherwise.\n    'include_nav': None,\n    'include_next_prev': None,\n\n    # PyMarkdown extension names.\n    'markdown_extensions': (),\n\n    # Determine if the site should generate a json search index and include\n    # search elements in the theme. - TODO\n    'include_search': False,\n\n    # Determine if the site should include a 404.html page.\n    # TODO: Implment this. Make this None, have it True if a 404.html\n    # template exists in the theme or docs dir.\n    'include_404': False,\n\n    # Determine if the site should include a sitemap.xml page.\n    # TODO: Implement this. Make this None, have it True if a sitemap.xml\n    # template exists in the theme or docs dir.\n    'include_sitemap': False,\n}\n\n\ndef load_config(filename='mkdocs.yml', options=None):\n    options = options or {}\n    if 'config' in options:\n        filename = options['config']\n    if not os.path.exists(filename):\n        raise ConfigurationError(\"Config file '%s' does not exist.\" % filename)\n    with open(filename, 'r') as fp:\n        user_config = yaml.load(fp)\n    user_config.update(options)\n    return validate_config(user_config)\n\n\ndef validate_config(user_config):\n    config = DEFAULT_CONFIG.copy()\n    config.update(user_config)\n\n    if not config['site_name']:\n        raise ConfigurationError(\"Config must contain 'site_name' setting.\")\n\n    # If not specified, then the 'pages' config simply includes all\n    # markdown files in the docs dir, without generating any header items\n    # for them.\n    pages = []\n    extra_css = []\n    extra_javascript = []\n    for (dirpath, dirnames, filenames) in os.walk(config['docs_dir']):\n        for filename in sorted(filenames):\n            fullpath = os.path.join(dirpath, filename)\n            relpath = os.path.relpath(fullpath, config['docs_dir'])\n\n            if utils.is_markdown_file(filename):\n                # index pages should always be the first listed page.\n                if os.path.splitext(relpath)[0] == 'index':\n                    pages.insert(0, relpath)\n                else:\n                    pages.append(relpath)\n            elif utils.is_css_file(filename):\n                extra_css.append(relpath)\n            elif utils.is_javascript_file(filename):\n                extra_javascript.append(relpath)\n\n    if config['pages'] is None:\n        config['pages'] = pages\n\n    if config['extra_css'] is None:\n        config['extra_css'] = extra_css\n\n    if config['extra_javascript'] is None:\n        config['extra_javascript'] = extra_javascript\n\n    package_dir = os.path.dirname(__file__)\n    theme_dir = [os.path.join(package_dir, 'themes', config['theme'])]\n\n    if config['theme_dir'] is not None:\n        theme_dir.insert(0, config['theme_dir'])\n\n    config['theme_dir'] = theme_dir\n\n    if config['repo_url'] is not None and config['repo_name'] is None:\n        repo_host = urlparse(config['repo_url']).netloc.lower()\n        if repo_host == 'github.com':\n            config['repo_name'] = 'GitHub'\n        elif repo_host == 'bitbucket.com':\n            config['repo_name'] = 'Bitbucket'\n        else:\n            config['repo_name'] = repo_host.split('.')[0].title()\n\n    if config['include_next_prev'] is None:\n        config['include_next_prev'] = len(config['pages']) > 1\n\n    if config['include_nav'] is None:\n        config['include_nav'] = len(config['pages']) > 1\n\n    # To Do:\n\n    # The docs dir must exist.\n    # The theme dir must exist.\n    # Ensure 'theme' is one of 'mkdocs', 'readthedocs', 'custom'\n    # A homepage 'index' must exist.\n    # The theme 'base.html' file must exist.\n    # Cannot set repo_name without setting repo_url.\n    # Cannot set 'include_next_prev: true' when only one page exists.\n    # Cannot set 'include_nav: true' when only one page exists.\n    # Error if any config keys provided that are not in the DEFAULT_CONFIG.\n\n    return config\n", "path": "mkdocs/config.py"}], "after_files": [{"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport os\nimport yaml\n\nDEFAULT_CONFIG = {\n    'site_name': None,\n    'pages': None,\n\n    'site_url': None,\n    'site_description': None,\n    'site_author': None,\n    'site_favicon': None,\n\n    'theme': 'mkdocs',\n    'docs_dir': 'docs',\n    'site_dir': 'site',\n    'theme_dir': None,\n\n    'copyright': None,\n    'google_analytics': None,\n\n    # The address on which to serve the livereloading docs server.\n    'dev_addr': '127.0.0.1:8000',\n\n    # If `True`, use `<page_name>/index.hmtl` style files with hyperlinks to the directory.\n    # If `False`, use `<page_name>.html style file with hyperlinks to the file.\n    # True generates nicer URLs, but False is useful if browsing the output on a filesystem.\n    'use_directory_urls': True,\n\n    # Specify a link to the project source repo to be included\n    # in the documentation pages.\n    'repo_url': None,\n\n    # A name to use for the link to the project source repo.\n    # Default: If repo_url is unset then None, otherwise\n    # \"GitHub\" or \"Bitbucket\" for known url or Hostname for unknown urls.\n    'repo_name': None,\n\n    # Specify which css or javascript files from the docs\n    # directionary should be additionally included in the site.\n    # Default: List of all .css and .js files in the docs dir.\n    'extra_css': None,\n    'extra_javascript': None,\n\n    # Determine if the site should include the nav and next/prev elements.\n    # Default: True if the site has more than one page, False otherwise.\n    'include_nav': None,\n    'include_next_prev': None,\n\n    # PyMarkdown extension names.\n    'markdown_extensions': (),\n\n    # Determine if the site should generate a json search index and include\n    # search elements in the theme. - TODO\n    'include_search': False,\n\n    # Determine if the site should include a 404.html page.\n    # TODO: Implment this. Make this None, have it True if a 404.html\n    # template exists in the theme or docs dir.\n    'include_404': False,\n\n    # Determine if the site should include a sitemap.xml page.\n    # TODO: Implement this. Make this None, have it True if a sitemap.xml\n    # template exists in the theme or docs dir.\n    'include_sitemap': False,\n}\n\n\ndef load_config(filename='mkdocs.yml', options=None):\n    options = options or {}\n    if 'config' in options:\n        filename = options.pop('config')\n    if not os.path.exists(filename):\n        raise ConfigurationError(\"Config file '%s' does not exist.\" % filename)\n    with open(filename, 'r') as fp:\n        user_config = yaml.load(fp)\n        if not isinstance(user_config, dict):\n            raise ConfigurationError(\"The mkdocs.yml file is invalid. See http://www.mkdocs.org/user-guide/configuration/ for more information.\")\n    user_config.update(options)\n    return validate_config(user_config)\n\n\ndef validate_config(user_config):\n    config = DEFAULT_CONFIG.copy()\n    config.update(user_config)\n\n    if not config['site_name']:\n        raise ConfigurationError(\"Config must contain 'site_name' setting.\")\n\n    # If not specified, then the 'pages' config simply includes all\n    # markdown files in the docs dir, without generating any header items\n    # for them.\n    pages = []\n    extra_css = []\n    extra_javascript = []\n    for (dirpath, dirnames, filenames) in os.walk(config['docs_dir']):\n        for filename in sorted(filenames):\n            fullpath = os.path.join(dirpath, filename)\n            relpath = os.path.relpath(fullpath, config['docs_dir'])\n\n            if utils.is_markdown_file(filename):\n                # index pages should always be the first listed page.\n                if os.path.splitext(relpath)[0] == 'index':\n                    pages.insert(0, relpath)\n                else:\n                    pages.append(relpath)\n            elif utils.is_css_file(filename):\n                extra_css.append(relpath)\n            elif utils.is_javascript_file(filename):\n                extra_javascript.append(relpath)\n\n    if config['pages'] is None:\n        config['pages'] = pages\n\n    if config['extra_css'] is None:\n        config['extra_css'] = extra_css\n\n    if config['extra_javascript'] is None:\n        config['extra_javascript'] = extra_javascript\n\n    package_dir = os.path.dirname(__file__)\n    theme_dir = [os.path.join(package_dir, 'themes', config['theme'])]\n\n    if config['theme_dir'] is not None:\n        theme_dir.insert(0, config['theme_dir'])\n\n    config['theme_dir'] = theme_dir\n\n    if config['repo_url'] is not None and config['repo_name'] is None:\n        repo_host = urlparse(config['repo_url']).netloc.lower()\n        if repo_host == 'github.com':\n            config['repo_name'] = 'GitHub'\n        elif repo_host == 'bitbucket.com':\n            config['repo_name'] = 'Bitbucket'\n        else:\n            config['repo_name'] = repo_host.split('.')[0].title()\n\n    if config['include_next_prev'] is None:\n        config['include_next_prev'] = len(config['pages']) > 1\n\n    if config['include_nav'] is None:\n        config['include_nav'] = len(config['pages']) > 1\n\n    # To Do:\n\n    # The docs dir must exist.\n    # The theme dir must exist.\n    # Ensure 'theme' is one of 'mkdocs', 'readthedocs', 'custom'\n    # A homepage 'index' must exist.\n    # The theme 'base.html' file must exist.\n    # Cannot set repo_name without setting repo_url.\n    # Cannot set 'include_next_prev: true' when only one page exists.\n    # Cannot set 'include_nav: true' when only one page exists.\n    # Error if any config keys provided that are not in the DEFAULT_CONFIG.\n\n    return config\n", "path": "mkdocs/config.py"}]}