Changeset d2471df


Ignore:
Timestamp:
May 12, 2010 7:26:35 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
8483f24
Parents:
1a4ee0f
Message:

Some shaky cloning stuff. Can't swear it was a problem, but this should prevent accident connections between list objects during a clone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/topdl.py

    r1a4ee0f rd2471df  
    218218        else: l = None
    219219
    220         return Interface(substrate=self.substrate, name=self.name,
     220        return Interface(substrate=[s for s in self.substrate], name=self.name,
    221221                capacity=c, latency=l,
    222222                attribute = [ a.clone() for a in self.attribute])
     
    275275
    276276    def clone(self):
    277         return Computer(name=self.name,
     277        # Copy the list of names
     278        return Computer(name=[ n for n in self.name ],
    278279                cpu=[x.clone() for x in self.cpu],
    279280                os=[x.clone() for x in self.os],
     
    286287        rv = { }
    287288        if self.name:
    288             rv['name'] = self.name
     289            rv['name'] = [ n for n in self.name]
    289290        if self.cpu:
    290291            rv['cpu'] = [ c.to_dict() for  c in self.cpu ]
Note: See TracChangeset for help on using the changeset viewer.