File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,29 +34,29 @@ class EnumValue(enum.Enum):
34
34
elif isinstance (value, enum .Enum):
35
35
return cls (value.value)
36
36
else :
37
- raise TypeError
37
+ return None
38
38
39
39
def __lt__ (self , other ):
40
40
other = self ._try_from(other)
41
- if self .__tid__ != other.__tid__:
41
+ if not other or self .__tid__ != other.__tid__:
42
42
return NotImplemented
43
43
return self ._index_ < other._index_
44
44
45
45
def __gt__ (self , other ):
46
46
other = self ._try_from(other)
47
- if self .__tid__ != other.__tid__:
47
+ if not other or self .__tid__ != other.__tid__:
48
48
return NotImplemented
49
49
return self ._index_ > other._index_
50
50
51
51
def __le__ (self , other ):
52
52
other = self ._try_from(other)
53
- if self .__tid__ != other.__tid__:
53
+ if not other or self .__tid__ != other.__tid__:
54
54
return NotImplemented
55
55
return self ._index_ <= other._index_
56
56
57
57
def __ge__ (self , other ):
58
58
other = self ._try_from(other)
59
- if self .__tid__ != other.__tid__:
59
+ if not other or self .__tid__ != other.__tid__:
60
60
return NotImplemented
61
61
return self ._index_ >= other._index_
62
62
Original file line number Diff line number Diff line change @@ -970,7 +970,7 @@ def test_sync_prefer_rr_01(self):
970
970
level := sys::get_transaction_isolation(),
971
971
}
972
972
''' )
973
- self .assertEqual (str ( res .level ) , 'RepeatableRead' )
973
+ self .assertEqual (res .level , 'RepeatableRead' )
974
974
975
975
# This one can't
976
976
res = db2 .query_single ('''
You can’t perform that action at this time.
0 commit comments