]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
catalog-shares: ignore incoming/
authorBrian Warner <warner@allmydata.com>
Thu, 26 Jun 2008 18:23:44 +0000 (11:23 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 26 Jun 2008 18:23:44 +0000 (11:23 -0700)
src/allmydata/scripts/debug.py

index da6a2cedac24f49798a7b748d0aeaad391b28e69..999d51c75c3c9b61bd6c579dbe4e4a8067cb81af 100644 (file)
@@ -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)