mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
parent
fffb3ae75b
commit
58af7c8f69
@ -45,8 +45,12 @@ if len(sys.argv) > 1:
|
||||
sys.exit(0)
|
||||
|
||||
for nodename, basedir in nodedirs:
|
||||
files = len(os.listdir(os.path.join(basedir, "storage", "shares")))
|
||||
if os.path.exists(os.path.join(basedir, "storage", "shares", "incoming")):
|
||||
files -= 1 # the 'incoming' directory doesn't count
|
||||
print "%s.value %d" % (nodename, files)
|
||||
shares = 0
|
||||
root = os.path.join(basedir, "storage", "shares")
|
||||
|
||||
for dirpath, dirnames, filenames in os.walk(root, topdown=True):
|
||||
if dirpath == root and "incoming" in dirnames:
|
||||
dirnames.remove("incoming")
|
||||
shares += len(filenames)
|
||||
print "%s.value %d" % (nodename, shares)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user