fix in upstream lib for filenames

This commit is contained in:
msramalho
2022-06-21 01:44:48 +02:00
parent 74d421dc94
commit 8a8251d622
3 changed files with 31 additions and 23 deletions

View File

@@ -29,10 +29,3 @@ def getattr_or(o: object, prop: str, default=None):
except:
return default
class DateTimeEncoder(json.JSONEncoder):
# to allow json.dump with datetimes do json.dumps(obj, cls=DateTimeEncoder)
def default(self, o):
if isinstance(o, datetime):
return str(o) # with timezone
return json.JSONEncoder.default(self, o)