From 1b0781644d556c07df8c863f84da5b1ab3badc1d Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Tue, 7 Jun 2011 14:43:40 +0200
Subject: [PATCH] we need to evaluate vcs_authentication_list because we get it
 as string

---
 setup.py                               | 2 +-
 slapos/recipe/erp5testnode/__init__.py | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index 394924516..087e6637a 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 import glob
 import os
 
-version = '0.3-dev4'
+version = '0.3-dev5'
 name = 'slapos.cookbook'
 long_description = open("README.txt").read() + "\n" + \
     open("CHANGES.txt").read() + "\n"
diff --git a/slapos/recipe/erp5testnode/__init__.py b/slapos/recipe/erp5testnode/__init__.py
index c48df631f..4d0b409ad 100644
--- a/slapos/recipe/erp5testnode/__init__.py
+++ b/slapos/recipe/erp5testnode/__init__.py
@@ -97,8 +97,8 @@ class Recipe(BaseSlapRecipe):
               bot_environment=self.parameter_dict.get('bot_environment', ''),
               partition_reference=CONFIG['partition_reference'],
               environment=dict(PATH=os.environ['PATH']),
-              vcs_authentication_list=self.parameter_dict.get(
-                     'vcs_authentication_list')
+              vcs_authentication_list=eval(self.parameter_dict.get(
+                     'vcs_authentication_list')),
             )
           ]))
 
@@ -112,8 +112,9 @@ class Recipe(BaseSlapRecipe):
     print "home_directory : %r" % home_directory
     git_dict.setdefault("git_server_name", "git.erp5.org")
     if git_dict.get('vcs_authentication_list', None) is not None:
+      vcs_authentication_list = eval(git_dict['vcs_authentication_list'])
       netrc_file = open(os.path.join(home_directory, '.netrc'), 'w')
-      for vcs_authentication_dict in git_dict['vcs_authentication_list']:
+      for vcs_authentication_dict in vcs_authentication_list:
         netrc_file.write("""
 machine %(host)s
 login %(user_name)s
-- 
2.30.9