mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
client.py: throw error when reserved_space= is unparseable. Closes #1812.
This should now fail quickly (during "tahoe start"). Previously this would silently treat an unparseable size as "0", and the only way to discover that it had had a problem would be to look at the foolscap log, or examine the storage-service web page for the unexpected "Reserved Size" number.
This commit is contained in:
committed by
David-Sarah Hopwood
parent
0a89b738bc
commit
b084396bdd
@ -257,12 +257,12 @@ class Client(node.Node, pollmixin.PollMixin):
|
||||
storedir = os.path.join(self.basedir, self.STOREDIR)
|
||||
|
||||
data = self.get_config("storage", "reserved_space", None)
|
||||
reserved = None
|
||||
try:
|
||||
reserved = parse_abbreviated_size(data)
|
||||
except ValueError:
|
||||
log.msg("[storage]reserved_space= contains unparseable value %s"
|
||||
% data)
|
||||
raise
|
||||
if reserved is None:
|
||||
reserved = 0
|
||||
discard = self.get_config("storage", "debug_discard", False,
|
||||
|
Reference in New Issue
Block a user