'Reads in the contents of the given path, adding its configuration values
to our current contents. If the path is a directory then this loads each
of the files, recursively.
.. versionchanged:: 1.3.0
Added support for directories.
:param str path: file or directory path to be loaded, this uses the last
loaded path if not provided
:raises:
* **IOError** if we fail to read the file (it doesn\'t exist, insufficient
permissions, etc)
* **ValueError** if no path was provided and we\'ve never been provided one'

def load(self, path=None):

    if path:
        self._path = path
    elif (not self._path):
        raise ValueError('Unable    to    load    configuration:    no    path    provided')
    if os.path.isdir(self._path):
        for (root, dirnames, filenames) in os.walk(self._path):
            for filename in filenames:
                self.load(os.path.join(root, filename))
        return
    with open(self._path, 'r') as config_file:
        read_contents = config_file.readlines()
    with self._contents_lock:
        while read_contents:
            line = read_contents.pop(0)
            comment_start = line.find('#')
            if (comment_start != (-1)):
                line = line[:comment_start]
            line = line.strip()
            if line:
                try:
                    (key, value) = line.split('    ', 1)
                    value = value.strip()
                except ValueError:
                    log.debug(("Config    entry    '%s'    is    expected    to    be    of    the    format    'Key    Value',    defaulting    to    '%s'    ->    ''" % (line, line)))
                    (key, value) = (line, '')
                if (not value):
                    multiline_buffer = []
                    while (read_contents and read_contents[0].lstrip().startswith('|')):
                        content = read_contents.pop(0).lstrip()[1:]
                        content = content.rstrip('\n')
                        multiline_buffer.append(content)
                    if multiline_buffer:
                        self.set(key, '\n'.join(multiline_buffer), False)
                        continue
                self.set(key, value, False)
