From: Brian Warner Date: Thu, 26 Jun 2008 18:23:44 +0000 (-0700) Subject: catalog-shares: ignore incoming/ X-Git-Tag: allmydata-tahoe-1.2.0~63 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/somewhere?a=commitdiff_plain;h=02ce46cfb43788530bdd4468ca23484c602f88b9;p=tahoe-lafs%2Ftahoe-lafs.git catalog-shares: ignore incoming/ --- diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index da6a2ced..999d51c7 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -449,8 +449,15 @@ def catalog_shares(config, out=sys.stdout, err=sys.stderr): now = time.time() for d in config.nodedirs: d = os.path.join(os.path.expanduser(d), "storage/shares") - if os.path.exists(d): - for abbrevdir in os.listdir(d): + try: + abbrevs = os.listdir(d) + except EnvironmentError: + # ignore nodes that have storage turned off altogether + pass + else: + for abbrevdir in abbrevs: + if abbrevdir == "incoming": + continue abbrevdir = os.path.join(d, abbrevdir) for si_s in os.listdir(abbrevdir): si_dir = os.path.join(abbrevdir, si_s)