Commits

William Pitcock committed 8947561

parsetree: improve statevar handling

  • Participants
  • Parent commits b62bde3

Comments (0)

Files changed (1)

File appliancekit/parsetree.py

         if self.chroot:
             cmdline += ['chroot', state['chroot']]
         for i in self.command:
-            if i.startswith('$'):
-                cmdline.append(state[i[1:]])
-                continue
-            cmdline.append(i)
+            st = i
+            for k, v in state.iteritems():
+                st = st.replace('$' + str(k), str(v))
+            cmdline.append(st)
         print ' '.join(cmdline)
         if simulate:
             return