From 21598c0dfa2ef5e322b5e28fdeffd969ba0ec66e Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Mon, 28 Apr 2014 08:19:57 -0700
Subject: [PATCH] Fix minor non-important error in cache_devstack

Found this while porting to diskimage-builder - the basedir value
is passed but not used. It's ok, because we happen to be using the
same value- but it's an error waiting to happen.

Change-Id: Ic2f39a9ff54c7bcdf3fcd48c4c6b2f98f6a88cf0
---
 .../files/nodepool/scripts/cache_devstack.py                  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/openstack_project/files/nodepool/scripts/cache_devstack.py b/modules/openstack_project/files/nodepool/scripts/cache_devstack.py
index a8abdcf109..4eee298598 100755
--- a/modules/openstack_project/files/nodepool/scripts/cache_devstack.py
+++ b/modules/openstack_project/files/nodepool/scripts/cache_devstack.py
@@ -52,7 +52,7 @@ def tokenize(fn, tokens, distribution, comment=None):
 def _legacy_find_images(basedir):
     """Divine what images we should use based on parsing stackrc."""
     images = []
-    for line in open(os.path.join(DEVSTACK, 'stackrc')):
+    for line in open(os.path.join(basedir, 'stackrc')):
         line = line.strip()
         if line.startswith('IMAGE_URLS'):
             if '#' in line:
@@ -78,7 +78,7 @@ def _legacy_find_images(basedir):
 def _find_images(basedir):
     images = []
     try:
-        image_tool = os.path.join(DEVSTACK, 'tools', 'image_list.sh')
+        image_tool = os.path.join(basedir, 'tools', 'image_list.sh')
         if os.path.exists(image_tool):
             images = subprocess.check_output(image_tool).split('\n')
     except subprocess.CalledProcessError as ce: