File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
-
3
2
import re
4
3
import struct
5
4
import binascii
5
+ from copy import deepcopy
6
6
from io import BytesIO
7
7
8
8
def overlap (i1 , i2 ):
@@ -165,7 +165,7 @@ def __add__(self, other):
165
165
raise Exception ('Attempt to merge different SID'
166
166
'%s != %s' % (self .sid , other .sid ))
167
167
168
- result = Gtid ( str ( self ) )
168
+ result = deepcopy ( self )
169
169
170
170
for itvl in other .intervals :
171
171
result .__add_interval (itvl )
@@ -175,7 +175,7 @@ def __add__(self, other):
175
175
def __sub__ (self , other ):
176
176
"""Remove intervals. Do not raise, if different SID simply
177
177
ignore"""
178
- result = Gtid ( str ( self ) )
178
+ result = deepcopy ( self )
179
179
if self .sid != other .sid :
180
180
return result
181
181
@@ -276,6 +276,7 @@ def __ge__(self, other):
276
276
return self .intervals >= other .intervals
277
277
278
278
279
+
279
280
class GtidSet (object ):
280
281
"""Represents a set of Gtid"""
281
282
def __init__ (self , gtid_set ):
You can’t perform that action at this time.
0 commit comments