Skip to content

Commit

Permalink
Remove custom JSON endcoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barkin Simsek committed May 30, 2022
1 parent be59504 commit bd0ec79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
5 changes: 1 addition & 4 deletions python/mujincontrollerclient/controllerclientbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from . import json
from . import urlparse
from . import uriutils
from . import encodingutils
from . import controllergraphclient

# Logging
Expand Down Expand Up @@ -718,10 +717,8 @@ def GetCycleLogs(self, fields=None, offset=0, limit=0, usewebapi=True, timeout=5
def CreateLogEntries(self, logEntries, fields=None, usewebapi=True, timeout=5):
assert(usewebapi)
files = []
# we need to use the regular json library instead of ujson since ujson doesn't support custom encoders
import json
for logEntry in logEntries:
files.append(('logEntry', (None, json.dumps(logEntry, cls=encodingutils.DatetimeEncoder), 'application/json')))
files.append(('logEntry', (None, json.dumps(logEntry), 'application/json')))
return self._webclient.APICall('POST', u'logEntry/', files=files, fields=fields, timeout=timeout)

#
Expand Down
28 changes: 0 additions & 28 deletions python/mujincontrollerclient/encodingutils.py

This file was deleted.

0 comments on commit bd0ec79

Please sign in to comment.