Skip to content

Commit 9c2007d

Browse files
committed
[submitter] Fix SubmitterOptionsEnum.ALL mode on py 3.9
1 parent 57f2981 commit 9c2007d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

meshroom/core/submitter.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/usr/bin/env python
22

3-
from meshroom.common import BaseObject, Property
3+
import logging
4+
import operator
45
from enum import IntFlag, auto
56
from typing import Optional
6-
import logging
7+
from itertools import accumulate
8+
from meshroom.common import BaseObject, Property
79

810

911
class SubmitterOptionsEnum(IntFlag):
@@ -23,7 +25,8 @@ def get(cls, option):
2325
return option
2426
return 0
2527

26-
SubmitterOptionsEnum.ALL = SubmitterOptionsEnum._all_bits_
28+
# SubmitterOptionsEnum.ALL = SubmitterOptionsEnum(SubmitterOptionsEnum._all_bits_) # _all_bits_ -> py 3.11
29+
SubmitterOptionsEnum.ALL = list(accumulate(SubmitterOptionsEnum, operator.__ior__))[-1]
2730

2831

2932
class SubmitterOptions:

0 commit comments

Comments
 (0)