mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
Import ABC from collections.abc (#983)
Use compatibility layer for Python 2 support
This commit is contained in:
parent
058cb87d2a
commit
165ba412e4
3 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
from meshroom.common import BaseObject, Property, Variant, VariantList
|
||||
from meshroom.core import pyCompatibility
|
||||
from enum import Enum # available by default in python3. For python2: "pip install enum34"
|
||||
import collections
|
||||
import math
|
||||
import os
|
||||
import psutil
|
||||
|
@ -230,7 +229,7 @@ class ChoiceParam(Param):
|
|||
if self.exclusive:
|
||||
return self.conformValue(value)
|
||||
|
||||
if not isinstance(value, collections.Iterable):
|
||||
if not isinstance(value, pyCompatibility.Iterable):
|
||||
raise ValueError('Non exclusive ChoiceParam value should be iterable (param:{}, value:{}, type:{})'.format(self.name, value, type(value)))
|
||||
return [self.conformValue(v) for v in value]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue