Skip to content

Commit b07385b

Browse files
committed
pickle would not work
if you have __slots__ pickle needs these 2 functions vistrails wants to pickle the markers of taylordiagrams, not sure why....
1 parent c8ff7e6 commit b07385b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Packages/vcs/Lib/taylor.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,27 @@ class TDMarker(object):
9595
'number'
9696
]
9797

98+
def __getstate__(self):
99+
return {
100+
'name':self.name,
101+
'status':self.status,
102+
'line':self.line,
103+
'id':self.id,
104+
'id_size':self.id_size,
105+
'id_color':self.id_color,
106+
'id_font':self.id_font,
107+
'symbol':self.symbol,
108+
'color':self.color,
109+
'size':self.size,
110+
'xoffset':self.xoffset,
111+
'yoffset':self.yoffset,
112+
'line_color':self.line_color,
113+
'line_size':self.line_size,
114+
'line_type':self.line_type,
115+
'number':self.number}
116+
def __setstate__(self,dict):
117+
for k in dict.keys():
118+
setattr(self,k,dict[k])
98119
def __init__(self):
99120
self.name='marker'
100121
self._status=[]

0 commit comments

Comments
 (0)