From 66962790e1bf975198704157b57f23e22960db0c Mon Sep 17 00:00:00 2001
From: Daira Hopwood <david-sarah@jacaranda.org>
Date: Fri, 17 May 2013 20:47:42 +0100
Subject: [PATCH] A missing basedir should cause an error if we try to read the
 config. refs #1971

Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
---
 src/allmydata/node.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/allmydata/node.py b/src/allmydata/node.py
index 0bafc2b3..45470a55 100644
--- a/src/allmydata/node.py
+++ b/src/allmydata/node.py
@@ -119,6 +119,8 @@ class ConfigMixin:
         except EnvironmentError:
             if os.path.exists(tahoe_cfg):
                 raise
+            if not os.path.isdir(self.basedir):
+                raise MissingConfigEntry("%s is missing or not a directory." % quote_output(self.basedir))
 
     def error_about_old_config_files(self):
         """ If any old configuration files are detected, raise OldConfigError. """
-- 
2.45.2