Changeset 28 for trunk/change.py
- Timestamp:
- 26/11/07 20:14:17 (4 years ago)
- Files:
-
- 1 modified
-
trunk/change.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/change.py
r27 r28 215 215 return '<%s: %s>' % ( self.__class__, self.name ) 216 216 217 def copy(self): 218 """ 219 Create a copy of myself. 220 """ 221 newchange = CommandChange('Copy of %s' % self.name, 222 self.devices, 223 self.serial_mode, 224 self.backout_all, 225 self.on_fail_continue, 226 self.on_fail_retry, 227 self.max_retries, 228 self.pre_impl, 229 self.impl, 230 self.post_impl, 231 self.pre_backout, 232 self.backoutset, 233 self.post_backout, 234 self.pre_requisites, 235 ) 236 237 # set the namespace as a copy of mine 238 if self.namespace is not None: 239 newchange.namespace = self.namespace.copy() 240 pass 241 242 return newchange 243 217 244 def set_state(self, state_string): 218 245 self.state = CHANGE_STATE[state_string] … … 236 263 for ns in self.iterator: 237 264 log.debug("Adding namespace entry of: %s", ns) 238 # FIXME: This permanently updates the namespace. 239 # Should we be updating a local copy? 265 266 # Make sure we only update a copy, so that this 267 # update isn't permanent 240 268 newnamespace = ns.copy() 241 269 newnamespace.update(namespace)
