relative external path
authorAnas Nashif <anas.nashif@intel.com>
Thu, 3 May 2012 15:35:45 +0000 (16:35 +0100)
committerAnas Nashif <anas.nashif@intel.com>
Thu, 3 May 2012 15:35:45 +0000 (16:35 +0100)
kswriter/KSWriter.py

index e9e0bea..7db3a62 100644 (file)
@@ -131,9 +131,11 @@ class KSWriter():
                     else:
                         print "%s is inactive, not generating %s at this time" %(img['Name'], img['FileName'] )
         for path in self.image_meta['ExternalConfigs']:
-            for f in os.listdir(path):
+            external_config_dir = os.path.join(os.path.dirname(self.image_filename), path)
+            
+            for f in os.listdir(external_config_dir)):
                 if f.endswith('.yaml'):
-                    fp = file('%s/%s' %(path, f), 'r')
+                    fp = file('%s/%s' %(external_config_dir, f), 'r')
                     local = yaml.load(fp)
                     conf = self.parse(local)
                     if self.config: