node.py: fix the error path for a missing config option so that it works for a Unicode base directory.

This commit is contained in:
david-sarah 2011-08-06 15:10:07 -07:00
parent 531758df19
commit 1967233f49

View File

@ -105,9 +105,9 @@ class Node(service.MultiService):
return self.config.get(section, option)
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
if default is _None:
fn = os.path.join(self.basedir, "tahoe.cfg")
fn = os.path.join(self.basedir, u"tahoe.cfg")
raise MissingConfigEntry("%s is missing the [%s]%s entry"
% (fn, section, option))
% (quote_output(fn), section, option))
return default
def set_config(self, section, option, value):