Skip to content

Commit b388ac5

Browse files
committed
Fix a test that was failing. Prior to Python 3.9, uuid.UUID had __dict__.
1 parent a14e6eb commit b388ac5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/conductor/client/http/api_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import tempfile
77
import time
88
from typing import Dict
9+
import uuid
910

1011
import six
1112
import urllib3
@@ -198,6 +199,8 @@ def sanitize_for_serialization(self, obj):
198199
for sub_obj in obj)
199200
elif isinstance(obj, (datetime.datetime, datetime.date)):
200201
return obj.isoformat()
202+
elif isinstance(obj, uuid.UUID): # needed for compatibility with Python 3.7
203+
return str(obj) # Convert UUID to string
201204

202205
if isinstance(obj, dict) or isinstance(obj, CaseInsensitiveDict):
203206
obj_dict = obj

0 commit comments

Comments
 (0)