From 0ee60a28ee81f7257aaf6320ce18eada354cc257 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 4 Oct 2007 15:49:40 +0000
Subject: [PATCH] Remove redundant check.

This isdir() check leads to a broken error message. Even fixing it creates some
cases in which the error message is nebulous and unclear while removing it
makes this situation be dealt with a lot better by the _OSOndiskVersion checks.


Reviewed-by: iustinp
---
 lib/backend.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/backend.py b/lib/backend.py
index 5f43919f8..500feba25 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -996,9 +996,6 @@ def OSFromDisk(name, base_dir=None):
 
   if base_dir is None:
     base_dir = _OSSearch(name)
-  else:
-    if not os.path.isdir(os.path.sep.join([base_dir, name])):
-      raise errors.InvalidOS(name, "OS not found in base dir %s" % base_dir)
 
   if base_dir is None:
     raise errors.InvalidOS(name, None, "OS dir not found in search path")
-- 
GitLab