Skip to content

Commit 74a3abf

Browse files
committed
Fix dataiku-api-client-python on Python 2
1 parent 9e7a7d1 commit 74a3abf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dataikuapi/dss/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ class DSSComputedColumn(object):
4747
def formula(name, formula, type="double"):
4848
return {"expr": formula, "mode": "GREL", "name": name, "type": type}
4949

50-
from enum import Enum
50+
import sys
51+
if sys.version_info > (3,4):
52+
from enum import Enum
53+
else:
54+
class Enum(object):
55+
pass
56+
5157
class DSSFilterOperator(Enum):
5258
EMPTY_ARRAY = "empty array"
5359
NOT_EMPTY_ARRAY = "not empty array"

0 commit comments

Comments
 (0)