client.py: add a 'debug_no_storage' option to throw out all share data

This commit is contained in:
Brian Warner
2007-07-16 18:07:03 -07:00
parent e91288d9ed
commit 1aa22b9abd
2 changed files with 10 additions and 2 deletions

View File

@ -83,7 +83,9 @@ class Client(node.Node, Referenceable):
"G": 1000 * 1000 * 1000,
}[suffix]
sizelimit = int(number) * multiplier
self.add_service(StorageServer(storedir, sizelimit))
NOSTORAGE_FILE = os.path.join(self.basedir, "debug_no_storage")
no_storage = os.path.exists(NOSTORAGE_FILE)
self.add_service(StorageServer(storedir, sizelimit, no_storage))
def _check_hotline(self, hotline_file):
if os.path.exists(hotline_file):