Attempted fix to preservation of self.variables.
authorCarl Hetherington <cth@carlh.net>
Thu, 27 Feb 2014 00:30:41 +0000 (00:30 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 27 Feb 2014 00:30:41 +0000 (00:30 +0000)
cdist

diff --git a/cdist b/cdist
index 3f6e907cdeb1c3b16ed2ad20fbab26b6402d3cde..c463cba26ff6cfa573522900273c1b7385c2ab72 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -25,6 +25,7 @@ import argparse
 import datetime
 import subprocess
 import re
+import copy
 
 class Error(Exception):
     def __init__(self, value):
@@ -214,7 +215,7 @@ class Target(object):
         os.chdir(cwd)
 
     def build(self, project, options=None):
-        variables = self.variables
+        variables = copy.copy(self.variables)
         print 'Target %s builds %s with %s' % (self.platform, project.name, self.variables)
         project.cscript['build'](self, options)
         self.variables = variables