mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 11:51:21 +00:00
fixups after rebase
This commit is contained in:
parent
65ebde6f9d
commit
0f22b9bad0
@ -190,7 +190,9 @@ def read_config(basedir, portnumfile, generated_files=[], _valid_config_sections
|
||||
|
||||
|
||||
def config_from_string(config_str, portnumfile, basedir):
|
||||
# load configuration from in-memory string
|
||||
"""
|
||||
load configuration from in-memory string
|
||||
"""
|
||||
parser = ConfigParser.SafeConfigParser()
|
||||
parser.readfp(BytesIO(config_str))
|
||||
return _Config(parser, portnumfile, basedir, '<in-memory>')
|
||||
|
@ -399,7 +399,7 @@ class TestMissingPorts(unittest.TestCase):
|
||||
"[node]\n"
|
||||
"tub.port = \n"
|
||||
)
|
||||
config = config_from_string(self.basedir, "portnum", config_data)
|
||||
config = config_from_string(config_data, "portnum", self.basedir)
|
||||
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
Node(config)
|
||||
@ -416,7 +416,7 @@ class TestMissingPorts(unittest.TestCase):
|
||||
"[node]\n"
|
||||
"tub.location = \n"
|
||||
)
|
||||
config = config_from_string(self.basedir, "portnum", config_data)
|
||||
config = config_from_string(config_data, "portnum", self.basedir)
|
||||
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
Node(config)
|
||||
@ -434,7 +434,7 @@ class TestMissingPorts(unittest.TestCase):
|
||||
"tub.port = disabled\n"
|
||||
"tub.location = not_disabled\n"
|
||||
)
|
||||
config = config_from_string(self.basedir, "portnum", config_data)
|
||||
config = config_from_string(config_data, "portnum", self.basedir)
|
||||
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
Node(config)
|
||||
@ -452,7 +452,7 @@ class TestMissingPorts(unittest.TestCase):
|
||||
"tub.port = not_disabled\n"
|
||||
"tub.location = disabled\n"
|
||||
)
|
||||
config = config_from_string(self.basedir, "portnum", config_data)
|
||||
config = config_from_string(config_data, "portnum", self.basedir)
|
||||
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
Node(config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user