'Saves configuration contents to disk. If a path is provided then it
replaces the configuration location that we track.
:param str path: location to be saved to
:raises: **ValueError** if no path was provided and we\'ve never been provided one'

def save(self, path=None):

    if path:
        self._path = path
    elif (not self._path):
        raise ValueError('Unable    to    save    configuration:    no    path    provided')
    with self._contents_lock:
        with open(self._path, 'w') as output_file:
            for entry_key in sorted(self.keys()):
                for entry_value in self.get_value(entry_key, multiple=True):
                    if ('\n' in entry_value):
                        entry_value = ('\n|' + entry_value.replace('\n', '\n|'))
                    output_file.write(('%s    %s\n' % (entry_key, entry_value)))
