mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
Drop support for '\#', never was used by anything as far as we know.
This commit is contained in:
parent
0cf6ca86fb
commit
c3248524f0
@ -311,7 +311,7 @@ class _Config(object):
|
||||
return self.config.getboolean(section, option)
|
||||
|
||||
item = self.config.get(section, option)
|
||||
if option.endswith(".furl") and self._contains_unescaped_hash(item):
|
||||
if option.endswith(".furl") and '#' in item:
|
||||
raise UnescapedHashError(section, option, item)
|
||||
|
||||
return item
|
||||
|
@ -185,7 +185,6 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
"""
|
||||
Hashes in furl options are not allowed, resulting in exception.
|
||||
"""
|
||||
escaped = "lalal\\#onohash"
|
||||
basedir = self.mktemp()
|
||||
fileutil.make_dirs(basedir)
|
||||
with open(os.path.join(basedir, 'tahoe.cfg'), 'wt') as f:
|
||||
@ -196,11 +195,6 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
with self.assertRaises(UnescapedHashError):
|
||||
config.get_config("node", "log_gatherer.furl")
|
||||
|
||||
with open(os.path.join(basedir, 'tahoe.cfg'), 'wt') as f:
|
||||
f.write("[node]\n")
|
||||
f.write("log_gatherer.furl = %s\n" % (escaped,))
|
||||
self.assertEquals(config.get_config("node", "log_gatherer.furl"), escaped)
|
||||
|
||||
def test_missing_config_item(self):
|
||||
"""
|
||||
If a config item is missing:
|
||||
|
Loading…
Reference in New Issue
Block a user