Changeset 6a50b78 for fedd/deter/topdl.py
- Timestamp:
- Feb 5, 2012 7:29:57 PM (13 years ago)
- Branches:
- compt_changes, master
- Children:
- 25930db
- Parents:
- e8979e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/deter/topdl.py
re8979e2 r6a50b78 250 250 return rv 251 251 252 def __getstate__(self): 253 d = self.__dict__.copy() 254 del d['interfaces'] 255 return d 256 257 def __setstate__(self, d): 258 # Import everything from the pickle dict (except what we excluded in 259 # __getstate__) 260 self.__dict__.update(d) 261 self.interfaces = [] 262 252 263 class CPU(base): 253 264 def __init__(self, type, attribute=[]): … … 417 428 for a in self.attribute], "") 418 429 return rv 430 431 def __getstate__(self): 432 d = self.__dict__.copy() 433 del d['subs'] 434 return d 435 436 def __setstate__(self, d): 437 # Import everything from the pickle dict (except what we excluded in 438 # __getstate__) 439 self.__dict__.update(d) 440 self.subs = [] 419 441 420 442 … … 813 835 return rv 814 836 837 def __setstate__(self, d): 838 # Import everything from the pickle dict and call incorporate to 839 # connect them. 840 self.__dict__.update(d) 841 self.incorporate_elements() 842 815 843 816 844 def topology_from_xml(string=None, file=None, filename=None, top="topology"): … … 891 919 xp.ParseFile(file) 892 920 elif string: 893 xp.Parse(string, isfinal=True)921 xp.Parse(string, True) 894 922 else: 895 923 return None
Note: See TracChangeset
for help on using the changeset viewer.