Drop support for '\#', never was used by anything as far as we know.

This commit is contained in:
Itamar Turner-Trauring 2020-10-29 13:51:29 -04:00
parent 0cf6ca86fb
commit c3248524f0
2 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -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: