fixup hosts after class change
This commit is contained in:
@@ -83,6 +83,14 @@ class Host:
|
||||
self.cmds = []
|
||||
num += 1
|
||||
|
||||
|
||||
# called when reloading class from pickle
|
||||
def fixup(self):
|
||||
try:
|
||||
a=self.cmds
|
||||
except:
|
||||
self.cmds=[]
|
||||
|
||||
def getstate(self):
|
||||
return self.state
|
||||
|
||||
@@ -744,6 +752,8 @@ if os.path.exists(PICKFILE):
|
||||
pickf.close()
|
||||
except:
|
||||
os.unlink(PICKFILE)
|
||||
for h in hosts.keys():
|
||||
hosts[h].fixup()
|
||||
for h in drophosts:
|
||||
if h in hosts: # was: hosts.has_key(h):
|
||||
del hosts[h]
|
||||
|
||||
Reference in New Issue
Block a user